ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Two Servlet Filters Every Web Application Should Have
Subject:   MAJOR bug in compression filter for non-US webapps
Date:   2003-12-01 16:17:17
From:   knuterik
I started testing this compression setup after reading this article, and found the concept promising enough to start testing compression using the jspbook.jar in one of my webapps.


For a while everything seemed just OK (tested using english locale).
I decided to let this filter be part of my 'standard web-app setup', and set off developing on my webapp.


After a week or so, the shit really hit the fan ;-)
All the localised pages in my application was starting to look really funny. Where the norwegian characters was to have been, I instead got some funny (escaped?) characters instead. This also made some of my submit-buttons stop working (the ones with localised text on them).


I really had a hard time figuring out what the h... had happened, since this particular change was way back in time (a week ;-).


But after i a while, I figured out that the gzip compression filter was to blame.
- It actually CHANGES the character encoding of the output!!!!!!!!!


So, all my localised resources in my JSP pages suddenly went mad.


1 to 2 of 2
  1. MAJOR bug in compression filter for non-US webapps
    2003-12-01 18:50:58  jfalkner [View]

    • MAJOR bug in compression filter for non-US webapps
      2004-01-07 10:03:20  anonymous2 [View]

      • MAJOR bug in compression filter for non-US webapps
        2004-01-07 18:54:34  jfalkner [View]

        • MAJOR bug in compression filter for non-US webapps
          2004-01-08 02:00:40  anonymous2 [View]

    • Source code?
      2003-12-02 02:43:17  knuterik [View]

      • Source code?
        2003-12-03 17:01:57  jfalkner [View]

      • Source code?
        2003-12-03 16:58:41  jfalkner [View]

  2. Cause: hardcoded charset encoding
    2003-12-01 16:28:22  knuterik [View]

1 to 2 of 2