javaee / jersey

This is no longer the active Jersey repository. Please see the README.md
http://jersey.github.io
Other
2.86k stars 2.36k forks source link

Provide option to opt out from MEDIA_TYPE_MAPPINGS #3052

Open glassfishrobot opened 9 years ago

glassfishrobot commented 9 years ago

I have configured MEDIA_TYPE_MAPPINGS for my Jersey apps. Unfortunately, this causes some trouble with a generic upload service in my app.

@PUT
@Path("files/{filename}")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response uploadFile(
    @PathParam("filename") @NotNull @Size(max = 240) String filename, DataSource dataSource)

If someone uploads .../files/file.xml the extension is chopped of.

There should be some opt-out to this. Otherwise one has to disable this feature. This is what I did.

Here is the SO question for this.

Affected Versions

[2.11]

glassfishrobot commented 9 years ago

Reported by michael-o

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JERSEY-2780