Skip to content

Commit

Permalink
Fixed test failure issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkyu committed Jan 22, 2017
1 parent 7062538 commit faba98f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/littleshoot/proxy/impl/ProxyUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ public static HttpHeaders removeSdchEncoding(HttpHeaders headers) {
// latter regex should take care of the dangling comma case when
// 'sdch' was the first element in the list and there are other
// encodings.
String noSdch = ae.replaceAll(",? *(sdch|SDCH)", "").replace("^ *, *", "");
String noSdch = ae.replaceAll(",? *(sdch|SDCH)", "").replaceFirst("^ *, *", "");
headers.set(HttpHeaders.Names.ACCEPT_ENCODING, noSdch);
LOG.debug("Removed sdch and inserted: {}", noSdch);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void testRemoveSdchEncoding() {
assertRemoveSdchEncoding("sdch", "");
assertRemoveSdchEncoding("SDCH", "");
assertRemoveSdchEncoding("sdch, gzip", "gzip");
assertRemoveSdchEncoding("gzip,sdch,delate", "gzip,deflate");
assertRemoveSdchEncoding("gzip,sdch,deflate", "gzip,deflate");
assertRemoveSdchEncoding("gzip, sdch, deflate", "gzip, deflate");
assertRemoveSdchEncoding("gzip,deflate,sdch", "gzip,deflate");
assertRemoveSdchEncoding("gzip, deflate, sdch", "gzip, deflate");
Expand Down

0 comments on commit faba98f

Please sign in to comment.