Bug 981809

Summary: Possible compression issue when making jsonp request
Product: [Other] RHQ Project Reporter: Josh Osgood <osgoodjw>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.8CC: osgoodjw
Target Milestone: ---   
Target Release: RHQ 4.9   
Hardware: Unspecified   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-26 08:31:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patched rest-war file none

Description Josh Osgood 2013-07-05 21:51:51 UTC
Description of problem:
jsonp requests with 'accept-encoding: gzip' results in failure

How reproducible:
   Always

Steps to Reproduce:
1. Open the web browser (tested with firefox, chrome, IE)
2. Navigate to <RHQ-SERVER-ADDRESS>:<RHQ-PORT>/rest/resource/platforms?jsonp=test
3. Authenticate if prompted

Actual results:
Chrome:
   Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.
Firefox:
   Content Encoding Error: The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

Expected results:
   JSON platform details embedded in a javascript function called 'test'.

Additional info:
   After disabling compression requests in firefox, the page loads as expected.

   (Disable compression requests in firefox by navigating to about:config in URL bar, search for 'encoding', clear 'Value' field for 'network.http.accept-encoding'.)

   Also tested with Curl - whenever gzip encoding is requested via the header, the request fails.

Comment 1 Heiko W. Rupp 2013-07-09 21:02:05 UTC
Created attachment 771243 [details]
Patched rest-war file

Comment 2 Heiko W. Rupp 2013-07-09 21:04:55 UTC
Josh,
I've created a patched rhq-rest.war archive that would go into 
§SERVER/modules/org/rhq/rhq-enterprise-server-startup-subsystem/main/deployments/rhq.ear/

(the existing one is exploded, while the attachment is an archive, but that should not matter).

Would you be able to try that?

Thanks
  Heiko

Comment 3 Josh Osgood 2013-07-09 22:04:49 UTC
Heiko,

Your patch seems to have fixed the problem - bug resolved.

Thanks,
    Josh

Comment 4 Heiko W. Rupp 2013-07-10 07:06:36 UTC
Thanks Josh for checking.

master 206bc37502

Comment 5 Heiko W. Rupp 2014-03-26 08:31:27 UTC
Bulk closing now that 4.10 is out.

If you think an issue is not resolved, please open a new BZ and link to the existing one.