#7563 UI cert view doesn't work if Dogtag/tomcat feeds gzipped data
Closed: fixed 2 years ago Opened 2 years ago by tjaalton.

Dogtag/tomcat on Debian/Ubuntu seems to provide gzipped data which should be unpacked by apache for the web UI, but that's not happening for some reason:

DEBUG: response headers Date: Wed, 23 May 2018 21:50:11 GMT\r
Server: Apache/2.4.29 (Ubuntu)\r
Content-Type: application/xml\r
Vary : Accept-Encoding\r
Content-Encoding: gzip\r
Content-Length: 836\r

DEBUG: response body '\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03\xed\xd9]o\xa2@...
DEBUG: ra.find(): response: \x1f\x8b\b\xc9\xe6\xb8]v\xec\x0f\xdf.\x7f.%\x963\x9c\x06\xd0D...
ERROR: ra.find(): Unable to communicate with CMS (Start tag expected, '<' not found, line 1, column 1)

I heard that on Fedora the data is not gzipped, so this bug is not hit there. IPA apache config does have some support for mod_deflate, but looks like it's not complete to support this situation.


after disabling mod_deflate (which is one of the core modules always enabled on Debian) this doesn't happen anymore, so it's actually apache doing the compression and not dogtag

Interesting. I think the proper fix would be enhance the request code to handle gzip'd responses, so it doesn't care whether the response comes gzip'd or not.

There is a simple workaround (config change) so I don't think this will be a high priority, but it shouldn't be a large change either.

well I had to modify plugins/dogtag.py to not accept gzip, since it's uglier to modify conflate.conf

mod_deflate is enabled in Fedora by default but not really configured beyond that. What does your conflate.conf look like so we can try to reproduce?

I don't know where my "conflate" came from :D But deflate.conf has this:

<ifmodule mod_deflate.c="">
<ifmodule mod_filter.c="">
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/xml
</ifmodule>
</ifmodule>

it's the last rule which should make it reproduceable

Metadata Update from @ftweedal:
- Issue assigned to ftweedal

2 years ago

Metadata Update from @ftweedal:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/1974

2 years ago

master:

  • 1da3edd Handle compressed responses from Dogtag
  • 0a87de5 Backport gzip.decompress for Python 2

Metadata Update from @cheimes:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata