Tapestry 5
  1. Tapestry 5
  2. TAP5-1880

GZip compression should be disabled if the request is over http 1.0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.3.2
    • Fix Version/s: 5.3.4, 5.4
    • Component/s: tapestry-core
    • Labels:

      Description

      Internet explorer when behind a proxy defaults to using HTTP 1.0 (instead of HTTP 1.1) and in this scenario, GZIP compression is still applied to the response and the clients do not interpret the response correctly.

      This may either be caused by the client incorrectly setting 'accept-encoding' or incorrectly reading the 'encoding' headers at either end, however since it only occurs over http 1.0 it should just be disabled for all http 1.0 requests.

        Activity

        Hide
        Paul Stanton added a comment -

        This is more common than you might think. We've just had our two largest clients come up against this in the last week. It was initially very hard to diagnose GZIP as the culprit.

        Many corporate environments use internet explorer behind proxies.

        The problem manifests itself as lots of javascript syntax errors un-styled html.

        Show
        Paul Stanton added a comment - This is more common than you might think. We've just had our two largest clients come up against this in the last week. It was initially very hard to diagnose GZIP as the culprit. Many corporate environments use internet explorer behind proxies. The problem manifests itself as lots of javascript syntax errors un-styled html.
        Hide
        Steve Eynon added a comment -

        I think we may have run into the same issue last week... does this manifest itself as an intermittant error?

        Show
        Steve Eynon added a comment - I think we may have run into the same issue last week... does this manifest itself as an intermittant error?
        Hide
        Paul Stanton added a comment -

        i think it can, we did find that very occasionally we could get a successful render but at least 90% of the time it would fail completely. our temporarily solution is to disable GZIP compression altogether. we plan to enable it conditionally via apache soon.

        Show
        Paul Stanton added a comment - i think it can, we did find that very occasionally we could get a successful render but at least 90% of the time it would fail completely. our temporarily solution is to disable GZIP compression altogether. we plan to enable it conditionally via apache soon.
        Hide
        Howard M. Lewis Ship added a comment -

        If you haven't already realized this ... you could add a filter to detect this and use Response.disableCompression() as a workaround until a bug fix is available.

        Show
        Howard M. Lewis Ship added a comment - If you haven't already realized this ... you could add a filter to detect this and use Response.disableCompression() as a workaround until a bug fix is available.
        Hide
        Howard M. Lewis Ship added a comment -

        I'm struggling with how to determine if the request is HTTP/1.0 or HTTP/1.1 ... I haven't yet found a Servlet API method for this, or even anywhere it's exposed inside the Jetty code base.

        Show
        Howard M. Lewis Ship added a comment - I'm struggling with how to determine if the request is HTTP/1.0 or HTTP/1.1 ... I haven't yet found a Servlet API method for this, or even anywhere it's exposed inside the Jetty code base.
        Show
        Howard M. Lewis Ship added a comment - http://stackoverflow.com/questions/9827393/using-servlet-api-how-to-determine-if-request-was-http-1-0-or-http-1-1
        Hide
        Howard M. Lewis Ship added a comment -

        Not looking good on detecting this via HTTP version ... how about via user agent? What kind of user agent string is coming up through your proxy?

        Show
        Howard M. Lewis Ship added a comment - Not looking good on detecting this via HTTP version ... how about via user agent? What kind of user agent string is coming up through your proxy?
        Hide
        Steve Eynon added a comment -

        I've not looked at the HTTP 1.0 RFC yet but this seems to suggest that HTTP 1.0 supports GZIP, which would mean it's (yet another) IE issue...:

        http://stackoverflow.com/questions/239512/http-1-0-and-deflate-gzip

        Show
        Steve Eynon added a comment - I've not looked at the HTTP 1.0 RFC yet but this seems to suggest that HTTP 1.0 supports GZIP, which would mean it's (yet another) IE issue...: http://stackoverflow.com/questions/239512/http-1-0-and-deflate-gzip
        Hide
        Paul Stanton added a comment -

        yes agree its an ie issue.

        i assumed HttpServletRequest.getProtocol() would return HTTP/1.1 or HTTP/1.0 ?

        I haven't gotten around to trying this.

        Show
        Paul Stanton added a comment - yes agree its an ie issue. i assumed HttpServletRequest.getProtocol() would return HTTP/1.1 or HTTP/1.0 ? I haven't gotten around to trying this.
        Hide
        Paul Stanton added a comment -

        problem with user agent is that we noticed some requests in this scenario would come through with the wrong value ! another ie issue i'm sure.

        Show
        Paul Stanton added a comment - problem with user agent is that we noticed some requests in this scenario would come through with the wrong value ! another ie issue i'm sure.
        Hide
        Luke Wilson added a comment -

        Do you know whether this is just a 5.3 issue, or does it happen in 5.2 as well?

        Show
        Luke Wilson added a comment - Do you know whether this is just a 5.3 issue, or does it happen in 5.2 as well?
        Hide
        Paul Stanton added a comment - - edited

        i can't say for sure about 5.2 it was not happening in 5.1, we were hit when we upgraded from 5.1 to 5.3.

        Show
        Paul Stanton added a comment - - edited i can't say for sure about 5.2 it was not happening in 5.1, we were hit when we upgraded from 5.1 to 5.3.
        Hide
        Paul Stanton added a comment -

        should be prioritised due the adverse effect for 'most' new tapestry developers who run with the default settings expecting older browser support?

        Show
        Paul Stanton added a comment - should be prioritised due the adverse effect for 'most' new tapestry developers who run with the default settings expecting older browser support?

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Paul Stanton
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development