You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Tim Moore (JIRA)" <ji...@apache.org> on 2009/02/09 22:15:59 UTC

[jira] Created: (SHINDIG-907) Proxy servlet returns an invalid response when original response headers contain 'Transfer-Encoding: chunked'

Proxy servlet returns an invalid response when original response headers contain 'Transfer-Encoding: chunked'
-------------------------------------------------------------------------------------------------------------

                 Key: SHINDIG-907
                 URL: https://issues.apache.org/jira/browse/SHINDIG-907
             Project: Shindig
          Issue Type: Bug
          Components: Gadget Rendering Server (Java)
    Affects Versions: 1.0.x-incubating
            Reporter: Tim Moore


When the proxy handler receives a response that uses chunked transfer encoding, it retains the 'transfer-encoding' header in its own response, but doesn't actually send the response body in the chunked format.  This causes browsers & other clients to reject the response.

This can be seen most easily when a gadget links to an external stylesheet on a server that uses chunked responses.

For example, this gadget exhibits the problem: http://labs.atlassian.com/gadgets/lhardy/trunk/lhardy/gadget.xml
The gadget itself loads normally, but its linked CSS file does not, so the contents are presented unstyled.

Info on chunked transfer encoding at: http://en.wikipedia.org/wiki/Chunked_transfer_encoding

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-907) Proxy servlet returns an invalid response when original response headers contain 'Transfer-Encoding: chunked'

Posted by "Tim Moore (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Moore updated SHINDIG-907:
------------------------------

    Attachment: SHINDIG-907-transfer-encoding.diff

The simplest fix I could find for this is to add 'transfer-encoding' to the DISALLOWED_RESPONSE_HEADERS set in ProxyHandler.java (a patch for the 1.0.x-incubating branch is attached)

> Proxy servlet returns an invalid response when original response headers contain 'Transfer-Encoding: chunked'
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-907
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-907
>             Project: Shindig
>          Issue Type: Bug
>          Components: Gadget Rendering Server (Java)
>    Affects Versions: 1.0.x-incubating
>            Reporter: Tim Moore
>         Attachments: SHINDIG-907-transfer-encoding.diff
>
>
> When the proxy handler receives a response that uses chunked transfer encoding, it retains the 'transfer-encoding' header in its own response, but doesn't actually send the response body in the chunked format.  This causes browsers & other clients to reject the response.
> This can be seen most easily when a gadget links to an external stylesheet on a server that uses chunked responses.
> For example, this gadget exhibits the problem: http://labs.atlassian.com/gadgets/lhardy/trunk/lhardy/gadget.xml
> The gadget itself loads normally, but its linked CSS file does not, so the contents are presented unstyled.
> Info on chunked transfer encoding at: http://en.wikipedia.org/wiki/Chunked_transfer_encoding

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-907) Proxy servlet returns an invalid response when original response headers contain 'Transfer-Encoding: chunked'

Posted by "Tim Moore (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672037#action_12672037 ] 

Tim Moore commented on SHINDIG-907:
-----------------------------------

Thanks for the quick response, Kevin! Would you mind also merging this change to the 1.0.x-incubating branch?

> Proxy servlet returns an invalid response when original response headers contain 'Transfer-Encoding: chunked'
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-907
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-907
>             Project: Shindig
>          Issue Type: Bug
>          Components: Gadget Rendering Server (Java)
>    Affects Versions: 1.0.x-incubating
>            Reporter: Tim Moore
>            Assignee: Kevin Brown
>             Fix For: trunk
>
>         Attachments: SHINDIG-907-transfer-encoding.diff
>
>
> When the proxy handler receives a response that uses chunked transfer encoding, it retains the 'transfer-encoding' header in its own response, but doesn't actually send the response body in the chunked format.  This causes browsers & other clients to reject the response.
> This can be seen most easily when a gadget links to an external stylesheet on a server that uses chunked responses.
> For example, this gadget exhibits the problem: http://labs.atlassian.com/gadgets/lhardy/trunk/lhardy/gadget.xml
> The gadget itself loads normally, but its linked CSS file does not, so the contents are presented unstyled.
> Info on chunked transfer encoding at: http://en.wikipedia.org/wiki/Chunked_transfer_encoding

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHINDIG-907) Proxy servlet returns an invalid response when original response headers contain 'Transfer-Encoding: chunked'

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Brown resolved SHINDIG-907.
---------------------------------

       Resolution: Fixed
    Fix Version/s: trunk
         Assignee: Kevin Brown

Applied. Thanks!

> Proxy servlet returns an invalid response when original response headers contain 'Transfer-Encoding: chunked'
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-907
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-907
>             Project: Shindig
>          Issue Type: Bug
>          Components: Gadget Rendering Server (Java)
>    Affects Versions: 1.0.x-incubating
>            Reporter: Tim Moore
>            Assignee: Kevin Brown
>             Fix For: trunk
>
>         Attachments: SHINDIG-907-transfer-encoding.diff
>
>
> When the proxy handler receives a response that uses chunked transfer encoding, it retains the 'transfer-encoding' header in its own response, but doesn't actually send the response body in the chunked format.  This causes browsers & other clients to reject the response.
> This can be seen most easily when a gadget links to an external stylesheet on a server that uses chunked responses.
> For example, this gadget exhibits the problem: http://labs.atlassian.com/gadgets/lhardy/trunk/lhardy/gadget.xml
> The gadget itself loads normally, but its linked CSS file does not, so the contents are presented unstyled.
> Info on chunked transfer encoding at: http://en.wikipedia.org/wiki/Chunked_transfer_encoding

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.