Skip to content

Commit

Permalink
ignore Content-Length header as well
Browse files Browse the repository at this point in the history
  • Loading branch information
dnet committed Nov 22, 2017
1 parent 3f13c53 commit ab6b76f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,16 @@ private static boolean processCookies(String prefix, StringBuilder py,
return cookiesExist;
}

private static final Collection<String> IGNORE_HEADERS = Arrays.asList("host:", "content-length:");

private static void processHeaders(StringBuilder py, List<String> headers) {
boolean firstHeader = true;
header_loop:
for (String header : headers) {
if (header.toLowerCase().startsWith("host:")) continue;
String lowerCaseHeader = header.toLowerCase();
for (String headerToIgnore : IGNORE_HEADERS) {
if (lowerCaseHeader.startsWith(headerToIgnore)) continue header_loop;
}
header = escapeQuotes(header);
int colonPos = header.indexOf(':');
if (colonPos == -1) continue;
Expand Down

0 comments on commit ab6b76f

Please sign in to comment.