Bug 1076830

Summary: encoding missing for svgz content
Product: [Fedora] Fedora EPEL Reporter: Bob Tennent <rdtennent>
Component: thttpdAssignee: Matthias Saou <matthias>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: el6CC: matthias
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-30 15:03:47 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
As described in the Additional info. none

Description Bob Tennent 2014-03-15 13:56:40 UTC
Created attachment 874797 [details]
As described in the Additional info.

Description of problem: svgz files are gzipped svg images.  The server is expected to provide both a Content-Encoding: gzip header and a
Content-Type: image/svg+xml header.  The thttpd package doesn't provide the former.

Version-Release number of selected component (if applicable): 2.25b-*.  Also applicable to Fedora releases of thttpd.


How reproducible: always


Steps to Reproduce:
1. provide an svgz file on the server
2. access the file on any modern browser
3.

Actual results:  error message about XML Parsing


Expected results: display of the image


Additional info: 

The headers can be observed using the Firefox Web Developer Extension (Information -> View Response Headers).  The Content-Encoding header will be missing. 
The problem is *not* that the browser can't handle a gzipped svg image.  If exactly the same file is renamed file.svg.gz, it will be displayed correctly (and thttpd will generate the necessary two headers).

One problem is that the file mime_encodings.txt needs an additional line:  svgz    gzip.
The other problem is that the figure_mime function in libhttpd.c doesn't allow for the possibility that a file extension like svgz can generate *both* an encoding *and* a type header.   

The attached patch addresses these two issues.  The code in figure_mime is re-arranged to allow a match with a mime_type as well as a mime_encoding.  The control-flow is actually much simpler in the revised code.

Comment 1 Bob Tennent 2014-03-15 14:03:34 UTC
Compare

http://linus.cs.queensu.ca/SVG/COMP14.svgz

and

http://tennent.ca/rdt/COMP14.svgz

The former is running thttpd out of the box.  The latter is running a patched version of thttpd.

Comment 2 Bob Tennent 2014-04-07 16:06:15 UTC
A patch correcting this bug has been accepted at

http://opensource.dyc.edu/bugzilla3/show_bug.cgi?id=3

Comment 3 Ben Cotton 2020-11-05 16:46:55 UTC
This message is a reminder that EPEL 6 is nearing its end of life. Fedora will stop maintaining and issuing updates for EPEL 6 on 2020-11-30. It is our policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of 'el6'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later EPEL version.

Thank you for reporting this issue and we are sorry that we were not able to fix it before EPEL 6 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged  change the 'version' to a later Fedora version prior this bug is closed as described in the policy above.

Comment 4 Ben Cotton 2020-11-30 15:03:47 UTC
EPEL el6 changed to end-of-life (EOL) status on 2020-11-30. EPEL el6 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
EPEL please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.