[ 
https://issues.apache.org/jira/browse/MNG-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16424828#comment-16424828
 ] 

Alex Dubov commented on MNG-6387:
---------------------------------

It's not a "shortcoming of websphere" it's a shortcoming of not being in the 
mime database. :)

 

Most things today rely on mime database to set the content-type correctly - I'm 
talking "Files.

probeContentType" and such ("mime-types" library for js, etc.). For pom, those 
things either return "application/octet-stream" or null, which requires adding 
explicit exceptions for pom files (but never "xml" out of the box, because 
"xml" file type can not be safely inferred without validation of the entire 
file - no magic field in it).

 

It was not a big issue so long as the maven repos were singular servers where 
such exceptions (forcing to xml) can be added once and forgotten. However, now 
that POMs have to flow across multiple S3 buckets (for example), adding code 
level exceptions for individual file types becomes a major liability.

 

Also, I'm not sure that there can be any issues with present clients. Because 
of the above, most POM downloaders ignore the mime type outright because it can 
not be relied upon (it ends up arbitrarily either "octet-stream" or "xml" or 
"plain" on the server side).

 

> Pom files should have a dedicated mime type registered ("application/pom+xml" 
> or similar)
> -----------------------------------------------------------------------------------------
>
>                 Key: MNG-6387
>                 URL: https://issues.apache.org/jira/browse/MNG-6387
>             Project: Maven
>          Issue Type: Wish
>          Components: POM
>            Reporter: Alex Dubov
>            Priority: Trivial
>
> For the sake of convenience working with ever growing abundance of packages, 
> and, thus, pom files, is not it time to give the humble pom file its own, 
> dedicated mime type (something to the tune of "application/pom+xml")?
> Presently, the fact that pom files don't have a dedicated mime type causes 
> all kinds of minor but annoying issues in all kinds of least expected places.
> Considering that registering a mime type with IANA is a pretty 
> straightforward process and that pom files are widely used for all kinds of 
> automation purposes (and not exclusively by maven anymore), I, on behalf of 
> the wider community, urge you to consider registering a dedicated pom mime 
> type.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to