maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tamás Cservenák (JIRA) <j...@codehaus.org>
Subject [jira] Commented: (MINDEXER-13) *.gz index not loadable using default LightweightHttpWagon
Date Fri, 25 Mar 2011 10:47:22 GMT

    [ http://jira.codehaus.org/browse/MINDEXER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=261451#action_261451
] 

Tamás Cservenák commented on MINDEXER-13:
-----------------------------------------

IMO, this is clearly HTTPd misconfiguration.

The HTTP header "Content-Type" (as set by Nexus) defines the _MIME type of the payload_, which
is application/x-compressed, since you are serving up a GZipped file.

The HTTP header "Content-Encoding" (as set by your HTTPd) according to RFC2616 states "what
additional content codings have been applied to the entity-body, and thus what decoding mechanisms
must be applied in order to obtain the media-type referenced by the Content-Type header field".
Meaning, this header is applied when HTTP server _modifies_ the body for transport purposes
(like optimizing it with compression), which is not the case here, you should be serving up
a GZ file "as is".

Clearly, your server "lies", since you _don't have to apply_ any decoding mechanism in order
to obtain the media-type (which is application/x-compressed) you originally published. You
published a GZ file and as client, you expect to download a GZ file, just like when you download
Maven distro (the tar.gz one) from Apache.


> *.gz index not loadable using default LightweightHttpWagon
> ----------------------------------------------------------
>
>                 Key: MINDEXER-13
>                 URL: http://jira.codehaus.org/browse/MINDEXER-13
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>         Environment: Ubuntu, JDK 6u24
>            Reporter: Jesse Glick
>         Attachments: MINDEXER.diff
>
>
> If you create a new-style index (without {{--legacy}}), publish on an HTTP server (Apache
2.2.9 in my case), and try to download the remote index from a client using the default {{LightweightHttpWagon}},
the download fails.
> The wagon upon seeing {{Content-Encoding: gzip}} automatically decompresses the index
and serves the raw data. {{IndexDataReader}} then passes this to {{GZIPInputStream}} which
chokes. (MINDEXER-12 then conceals the actual problem and makes it look like the indexer only
accepts the legacy format.)
> Have a patch which seems to work. Probably {{DownloadRemoteIndexerManagerTest}} needs
to be enhanced to check this case; I am not very familiar with Jetty so I have not tried this
yet.
> (Nexus sends {{Content-Type: application/x-compressed}} but no content encoding so the
problem is not visible when using a Nexus mirror.)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message