You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@archiva.apache.org by "Matt Magoffin (JIRA)" <ji...@codehaus.org> on 2014/04/16 02:05:10 UTC
[jira] (MRM-1830) Charset applied to binary repository HTTP
responses
Matt Magoffin created MRM-1830:
----------------------------------
Summary: Charset applied to binary repository HTTP responses
Key: MRM-1830
URL: https://jira.codehaus.org/browse/MRM-1830
Project: Archiva
Issue Type: Bug
Affects Versions: 2.0.1
Reporter: Matt Magoffin
Priority: Minor
I am trying to set up a Karaf Cave proxy of an Archiva repository filled with OSGi bundles, and noticed that Cave would not find any OSGi bundles after scanning the repository (e.g. by traversing the URLs under the */repository/* path). When investigating why, I noticed that Archiva sends in the HTTP response Content-Type header
{noformat}
Content-Type: application/java-archive;charset=UTF-8
{noformat}
The {{;charset=UTF-8}} caught me eye, and then I looked in Cave's source and noticed it performs a full string comparison, looking for just {{application/java-archive}}. I thought perhaps the error was more on the Archiva side, as sending the charset for the binary payload seems incorrect.
To be clear, I expected to see the following header:
{noformat}
Content-Type: application/java-archive
{noformat}
Looking in Archiva's *apps/archiva/WEB-INF/web.xml* I saw why the charset parameter was provided:
{noformat}
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
{noformat}
That filter forcibly applies the charset parameter to all responses.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)