Tapestry 5
  1. Tapestry 5
  2. TAP5-445

Add ability to turn off GZIP compression easily, for both static assets and dynamic page renders

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.0
    • Fix Version/s: 5.1.0.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      I have to report a huge regression because of Tapestry Compression.

      I just tried running with the latest tapestry and it worked just fine most of the time ( going against browsers ), but we interact with the Facebook proxy, and it looks like they got totally confused with the tapestry compression support, thus they would only serve up an error page. Luckily, with Tapestry's new configuration override feature (thank you howard), I was able to turn it off easily, and have my app working again.

      public void contributeHttpServletRequestHandler( OrderedConfiguration<HttpServletRequestFilter> configuration )

      { configuration.override( "GZIP", null ); }

      So I wanted to report this regression, it might be the case that I'm the only one affected, but we don't for sure, and probably people will never realize why it doesn't work. I don't know if any other issues might arise from tapestry-compression, but I will want to make sure I can turn the feature off as I need to.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        I think there needs to be a single, easy way to turn off compression (both for dynamic renders and for static assets).

        I'd be very interested if we could track down the problem; does the Facebook proxy ignore the "Content-Encoding" response header? Is there something else (some other header change, some other change to the content type) that Tapestry should be doing?

        Show
        Howard M. Lewis Ship added a comment - I think there needs to be a single, easy way to turn off compression (both for dynamic renders and for static assets). I'd be very interested if we could track down the problem; does the Facebook proxy ignore the "Content-Encoding" response header? Is there something else (some other header change, some other change to the content type) that Tapestry should be doing?
        Hide
        Fernando Padilla added a comment -

        Right. Like I said, since I found a quick solution I haven't spent any extra time on it, so it could be anything.

        The weird part is that if I turn on compression from tomcat, it's OK..

        So I would have to capture the request/response with tomcat compression, tapestry plain, then tapestry compression..

        maybe I'll do this later this week.

        Show
        Fernando Padilla added a comment - Right. Like I said, since I found a quick solution I haven't spent any extra time on it, so it could be anything. The weird part is that if I turn on compression from tomcat, it's OK.. So I would have to capture the request/response with tomcat compression, tapestry plain, then tapestry compression.. maybe I'll do this later this week.
        Hide
        Gabriel Falkenberg added a comment -

        Just so that people finding this page via Google has something to copy/paste to turn off GZIP-compression in their Tapestry 5 apps:

        public static void contributeApplicationDefaults(MappedConfiguration<String, String> configuration)

        { configuration.add(SymbolConstants.GZIP_COMPRESSION_ENABLED, "false"); }
        Show
        Gabriel Falkenberg added a comment - Just so that people finding this page via Google has something to copy/paste to turn off GZIP-compression in their Tapestry 5 apps: public static void contributeApplicationDefaults(MappedConfiguration<String, String> configuration) { configuration.add(SymbolConstants.GZIP_COMPRESSION_ENABLED, "false"); }

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Fernando Padilla
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development