You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "In Park (Jira)" <ji...@apache.org> on 2019/11/07 15:03:00 UTC

[jira] [Created] (KNOX-2102) Issue with Content-Length Header when rewriting response body

In Park created KNOX-2102:
-----------------------------

             Summary: Issue with Content-Length Header when rewriting response body
                 Key: KNOX-2102
                 URL: https://issues.apache.org/jira/browse/KNOX-2102
             Project: Apache Knox
          Issue Type: Bug
            Reporter: In Park


Content-Length value is preserved although response body is rewritten by KNOX. This causes a content length mismatch error.

DefaultDispatch.copyResponseHeaderFields() copies the Content-Length header from the original response regardless of whether rewrite happens or not.

*workaround*: This can be worked around by configuring the dispatch to exclude this header.
{code:java}
<dispatch classname="org.apache.knox.gateway.dispatch.ConfigurableDispatch">
    <param>
        <name>responseExcludeHeaders</name>
        <value>CONTENT-LENGTH</value>
    </param>
</dispatch>
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)