users@jsr311.java.net

RE: Re: When to sort Accept header values

From: Sergey Beryozkin <sberyozk_at_progress.com>
Date: Sat, 7 Feb 2009 13:11:17 -0500

Hi Stephan

I was trying to say that if a server replies with XML when Accept like
the one you posted is used then it would be surprising to see it
replying with JSON if this one was used

> Accept : application/xml, application/json

In other words, it's likely that the ordering would make a difference in
practice. As I said, RI will reply predictably (even though HTTP and the
spec do not recommend it :-)), and so CXF will do it too. Quality
factors will be honored, by when all of them are equal then it would
make sense to
just to start with the first media types

Cheers, Sergey

-----Original Message-----
From: Stephan.Koops_at_web.de [mailto:Stephan.Koops_at_web.de]
Sent: 06 February 2009 22:29
To: users_at_jsr311.dev.java.net
Subject: Re: When to sort Accept header values

Hi Sergey,

> Having such a compliant server reply with JSON when
> Accept : application/xml, application/json
>
> but with XML when
> Accept : application/xml, application/json;q=0.1
>
> seems lame :-)
>
> RI will reply with XML which seems perfectly normal to me and I'm not
> sure anyone will complain
This beahiour is ok according to HTTP. If you prefer xml, user
Accept: applicatio/xml;q=1,application/json;q=0.5

Or do I miss something?

best regards
   Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
For additional commands, e-mail: users-help_at_jsr311.dev.java.net