Burp Suite User Forum

Create new post

Unable to build http request with header

sourav | Last updated: May 05, 2023 06:17PM UTC

header = extender.helpers.analyzeRequest(currentreq).getHeaders() updatedheader = updateheader(str(header)) return extender.helpers.buildHttpMessage(updatedheader , body) I am trying to build the request, I am passing the header but buildHttpMessage create incorrect request like split user agent value as another header updateheader function returns the same header without any modification, I have tried print output, header and updatedheader both are exact the same, the same data type as Java array list the header (Accept-Encoding: gzip, deflate) is changed to (Accept-Encoding: gzip deflate) deflate is added as a header [POST /login/ HTTP/1.1, Host: localhost:8000, Accept-Encoding: gzip, deflate, Accept: */*, Accept-Language: en-US;q=0.9,en;q=0.8, User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36, Connection: close, Cache-Control: max-age=0, Content-Type: application/x-www-form-urlencoded, Content-Length: 67] <type 'java.util.ArrayList'> the value is the same in updatedheader and header

Hannah, PortSwigger Agent | Last updated: May 09, 2023 10:42AM UTC

Hi Could you drop us an email at support@portswigger.net with the extension code that is triggering the issue? If you're comfortable using Java, we'd highly recommend using the new Montoya API, as it has a lot of functionality around this use case.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.