IBM Support

PI15598: ENABLE OR DISABLE GZIP ENCODING

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Customer has request to serveResource failing. When javascript
    content is created by the serveResource method through use of a
    JSP, the resulting markup cannot be interpreted by the browser.
    Although Gzip encoding for javascript content is enabled, the
    HTTP response header "Content-Encoding: gzip" is not being set
    properly. The solution would be to deactivate gzip encoding in
    the portal and perform any necessary gzip encoding through the
    HTTP server. However, the gzip encoding cannot be deactivated
    through a central portal property.
    

Local fix

  • The settings for the Compression Filter may be changed in order
    to prevent GZIP encoding of content with javascript MIME types.
    To do so, the web.xml & web_merged.xml deployment descriptors
    for the wps.war file must be updated.
    
    Procedure for updating Compression Filter settings:
    
    1. Open the WAS Admin Console.
    
    2. Navigate to: Applications => Application Types => WebSphere
    enterprise applications.
    
    3. Page through the installed applications to locate the "wps"
    application.
    
    4. Click the checkbox to select the "wps" application and click
    the "export" button near the top of the page.
    
    5. Download the resulting wps.ear file to a temporary
    directory.
    
    6. Use an assembly tool or a jar file tool to
    access the wps.ear file.
    
    7. Within the wps.ear file, locate the wps.war file and
    navigate within the wps.war file to the WEB-INF directory.
    
    8. Within the wps.war file, you will need to edit two files:
    web.xml and web_merged.xml.
    
    9. Open the web.xml file for editing. Locate the Compression
    Filter section by searching for the string
    "ContentHandlerGzip".
    
    10. Locate the <init-param> section for the
    <param-name>mime-type.exclude</param-name>
    parameter.
    
    11. Add the string ".*javascript.*|" to the beginning of the
    <param-value> section for the init parameter and save the
    file. The resulting <init-param> section should appear as
    follows if no other changes have been made previously:
    
    <filter-class>com.ibm.wps.resolver.servlet
    .ContentHandlerGzip</filter-class>
    <init-param>
    <param-name>mime-type.exclude</param-name>
    <param-value>.*javascript.*|.*html.*|.*/(.*zip.*|
    .*compressed.*|.*gz.*)</param-value>
    </init-param>
    
    12. Now make the changes described in steps 9-11 for the
    web_merged.xml file.
    
    13. Use your assembly tool or jar tool to repackage the wps.ear
    file containing the modified wps.war file.
    
    14. In the WAS Admin Console, once again locate and select the
    "wps" WebSphere enterprise application and click the "update"
    button.
    
    15. Select the option "Replace the entire enterprise
    application" and select the updated wps.ear file. Click "next"
    
    16. Select "fast path" and "merge existing and new settings"
    click "Next".
    
    17. On the "Select Installation Options" page, use the settings
    provided and click "Next".
    
    18.  On the "Map modules to servers" page, select the
    "WebSphere Portal Server" module and click "Next".
    
    19.  On the "Summary" page, click "Finish".
    
    20. On the final page, wait for processing to complete and
    click the link "Save" to master configuration.
    
    21. Log out from the WAS Admin Console and restart the portal
    server.
    
    You should be able to verify that content with a javascript
    MIME type is no longer being gzip encoded by the portal.
    

Problem summary

Problem conclusion

  • This fix solves the problem by correctly setting the
    "Content-Encoding: gzip" HTTP response header when JavaScript
    content is generated through a JSP included by the serveResource
    method. In addition, it optionally allows GZIP encoding for all
    content to be centrally disabled by setting the custom property
    com.ibm.wps.resolver.servlet.AbstractServlet.enableGZIP to
    false.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI15598

  • Reported component name

    WEBSPHERE PORTA

  • Reported component ID

    5724E7600

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-04-09

  • Closed date

    2015-04-15

  • Last modified date

    2015-04-15

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBSPHERE PORTA

  • Fixed component ID

    5724E7600

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSHRKX","label":"WebSphere Portal"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0","Line of Business":{"code":"LOB31","label":"WCE Watson Marketing and Commerce"}}]

Document Information

Modified date:
21 December 2021