[ 
https://issues.apache.org/jira/browse/HTTPCORE-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

William R. Speirs updated HTTPCORE-264:
---------------------------------------

    Attachment: ResponseContent.diff

> Allow Overwriting of Content-Length & Transfer-Encoding Headers
> ---------------------------------------------------------------
>
>                 Key: HTTPCORE-264
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-264
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore
>    Affects Versions: 4.1.2, 4.2-alpha1, 4.2, Future
>         Environment: n/a
>            Reporter: William R. Speirs
>            Priority: Trivial
>              Labels: patch
>             Fix For: 4.1.2, 4.2, Future
>
>         Attachments: ResponseContent.diff
>
>
> Currently the ResponseContent interceptor will throw an exception if the 
> Content-Length or Transfer-Encoding headers are found in the response. I am 
> proposing a patch which adds 2 new constructors to ResponseContent. These new 
> constructors allow ResponseContent to overwrite the Content-Length and/or 
> Transfer-Encoding headers if they're already found instead of throwing an 
> exception.
> The biggest use I see for this is in a reverse proxy. The response from the 
> proxied server will already have proper Content-Length and Transfer-Encoding 
> headers. However, this interceptor throws an exception in this case. The 
> simple answer is to remove this interceptor; however, I would like to 
> clean-up any response where these headers might be missing.
> The default constructor is to thrown an exception if these headers are found.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to