We have filed a bug and are fixing the source with the Python piece, but in my research I have found that there a number of things out there that seem to depend on the space being there. While it is broken for the to depend on the space it is also broken for the space to not appear.
The solution I would up using was to change the nginx proxy in front of glassfish to spit out the ; charrset=utf-8.
Where do I fine a bug so that the adding of the space can happen with jersey (or glassfish, I am not sure which part is eating the space). The space is allowed and thus it is equally wrong for the Java side to not allow for it to be output (and even if it isn't allowed we need to cater tot he reality that there are broken clients out there!).
Thanks,
..darcy
On 2013-04-26, at 10:16 AM, Tatu Saloranta <tsaloranta_at_gmail.com> wrote:
> On Thu, Apr 25, 2013 at 8:33 PM, D'Arcy Smith <ds_at_terratap.com> wrote:
> I've got:
> @Produces(
> {
> MediaType.APPLICATION_JSON + "; charset=utf-8",
> MediaType.APPLICATION_XML + "; charset=utf-8",
> })
> which results in a header like:
>
> Content-Type: application/xml;charset=utf-8
> However some other code (a Python library) requires it to be like:
>
> Content-Type: application/xml; charset=utf-8
> (note the space between the ; and charset).
>
> From what I can tell the space is optional, but the Python library (out of our control) requires it.
>
> Any ideas on what I need to do to convince JAX-RS to spit out the space?
>
> Thanks,
>
> ..darcy
>
>
> As a sidenote, it would be good to file a bug against said Python library -- even if it's out of your immediate control, and even though it won't solve your immediate problem.
> This could help developers in future, if and when it gets fixed, or at least acknowledged.
> Who knows, it could even be an easy fix, and authors of that lib may not be aware of the problem.
>
> -+ Tatu +-
>
>
>