Skip to content

Commit

Permalink
Fix request line not being included in request headers
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreyD97 committed Dec 5, 2023
1 parent b630d53 commit bc8a894
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public Status getPreviousStatus() {
private Status processRequest() {


requestHeaders = request.headers();
requestHeaders = new ArrayList<>(request.headers());

this.requestHttpVersion = request.httpVersion();

Expand Down Expand Up @@ -513,8 +513,11 @@ public Object getValueByKey(LogEntryField columnName) {
return response.body().length();
case RTT:
return requestResponseDelay;
case REQUEST_HEADERS:
return requestHeaders != null ? requestHeaders.stream().map(HttpHeader::toString).collect(Collectors.joining("\r\n")) : "";
case REQUEST_HEADERS: {
if(requestHeaders == null) return "";
//Hacky workaround since Burp doesn't include path in headers.
return String.format("%s %s %s\r\n%s", request.method(), request.path(), request.httpVersion(), requestHeaders.stream().map(HttpHeader::toString).collect(Collectors.joining("\r\n")));
}
case RESPONSE_HEADERS:
return responseHeaders != null ? responseHeaders.stream().map(HttpHeader::toString).collect(Collectors.joining("\r\n")) : "";
case REDIRECT_URL:
Expand Down

0 comments on commit bc8a894

Please sign in to comment.