Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jaxrs-dev] Support for Accept-Charset

Hi Christian,

 I’m not aware of any implementation using Accept-Charset to influence the matching algorithm. Hopefully others can comment on this thread too.

— Santiago

On Apr 23, 2018, at 9:43 PM, Christian Kaltepoth <christian@xxxxxxxxxxxx> wrote:

Hi Santiago,

I agree that this issue needs more investigation. It looks like there are good argument for both preferring "Accept-Charset" and "Accept" with a charset parameter.

However, it is very weird that JAX-RS currently completely ignores "Accept-Charset" in the default case (not using Request.selectVariant()) although it is defined in RFC2616.

To sum up the facts:
  • RFC2616 explicitly defines "Accept-Charset" as the way for the client to request a preference for the charset.
  • There are different opinions about whether the "charset" media type parameter is allowed with the "Accept" header or not.
Does anyone know how the different JAX-RS implementations handle the "Accept-Charset" parameter? Is any implementation actually using it for something other than Request.selectVariant()?

Christian


Am Mo., 16. Apr. 2018 um 15:34 Uhr schrieb Santiago Pericas-Geertsen <santiago.pericasgeertsen@xxxxxxxxxx>:
Christian,

 I see a number of somewhat inconclusive discussions about this issue [1]. I don’t particularly prefer one approach over the other, but if we are going to make a change, we should be certain about it. Moreover, switching to Accept-Charset is likely to introduce a backward compatibility issue for us, which reinforces even more the certainty argument.

 Looks like this may require a bit more investigation.

— Santiago

[1] https://stackoverflow.com/questions/7055849/accept-and-accept-charset-which-is-superior

On Apr 14, 2018, at 5:16 AM, Christian Kaltepoth <christian@xxxxxxxxxxxx> wrote:

I agree that this aspect is a bit weird in the RFC.

Regarding your question:

What would happen if you have several media types in Accept with charsets and also several charsets listed in Accept-Charset?

Well, the RFC mandates that "Accept-Charset" is used for negotiating the charset. So IMO the charset provided in the media type parameter of "Accept" isn't relevant at all.

Just my 2 cents. :-)

Christian




--
_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jaxrs-dev

_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jaxrs-dev


--
_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jaxrs-dev


Back to the top