Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
4.1.2, 4.2-alpha1, 4.2, Future
-
n/a
Description
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.