PortSwigger / burp-extensions-montoya-api

Burp Extensions Api
Other
139 stars 5 forks source link

Content-Type of HttpRequestResponse is ambiguous #80

Closed floyd-fuh closed 8 months ago

floyd-fuh commented 1 year ago

Montoya's HttpRequestResponse class has a contentType() function:

https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/http/message/HttpRequestResponse.html#contentType()

However, a request can have a content type as well as a response. I would have expected the response content type to be returned. However, the function returns the request content type.

I would deprecate contentType() in HttpRequestResponse. Users can call request().contentType() or response().contentType()

floyd-fuh commented 8 months ago

Just saw this was deprecated already, thanks, cheers!