jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Regression in 3.0 / Bug 59401 / Possible solutions
Date Sun, 01 May 2016 20:09:38 GMT
On 1 May 2016 at 20:53, Philippe Mouawad <philippe.mouawad@gmail.com> wrote:
> Hello,
> As you know a regression has been reported on 3.0 related to Compressed
> responses management.
>
> HC4.5.2 differs in its behaviour with 4.2.6, it removes 3 headers after
> uncompressing the response:
> - Content-Length
> - Content-Encoding
> - Content-MD5
>
> I attached a fix to Bug 59401 that introduces a ResponseInterceptor at
> first position to save initial Headers.
> These headers are then used by JMeter to fill in
> SampleResult#responseHeaders
>
> I don't think the fix can introduce regressions but your review is welcome
> as long as alternative solutions proposals.
>
> The drawback I see in this patch is that it introduces a new
> ResponseInterceptor and saves Headers in localContext impacting slightly
> memory and CPU usage.
>
>
> An alternative solution, would be to modify slightly
> https://github.com/apache/httpclient/blob/4.5.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseContentEncoding.java#L142
> to remove the code that removes the headers.

-1; the headers cannot remain as they are no longer correct.

However an alternative might be to copy the original values to an
X-prefixed header before removal.

>
>
> Regards
> Philippe

Mime
View raw message