Hello all,

you may also add a new Filter in front of your application which
checks the agent (=>request.getClientInfo().getAgent()) and update the
quality of some accepted media-types (=>
request.getClientInfo().getAcceptedMediaTypes());
Or add a new preference for media-type "text/html" at the beginning of
the list with a quality of 1.

best regards,
Thierry Boileau

On Feb 18, 2008 5:41 PM, Rob Heittman <[EMAIL PROTECTED]> wrote:
>
> This legacy browser behavior is frustrating in the extreme.  Why in heaven's
> name would a tool meant primarily for viewing HTML, request XML as a higher
> quality representation?  Just goes to show how uber-excited everybody was
> about XML once upon a time.  You know, because in the future, all web pages
> will someday be XML with a reference to an XSL stylesheet, not HTML.
>
> Choosing a different MediaType for your XML, that the browser doesn't ask
> for, is the usual solution.
>
> Another workable solution I have found -- if you are using XML and will get
> criticized for making up MIME types -- is to expose the browser-friendly
> HTML variant by itself on a distinct URI (e.g. person.html).  That's sloppy
> too, just in a different way.
>
> Now, packaging your data with JSON instead of XML will avoid the issue
> altogether, without making up MIME types  =)
>
> - R
>
>
>
>
> On 2/18/08, Stephan Koops <[EMAIL PROTECTED]> wrote:
> > if a browser requests to a REST server, some browsers (Firefox and IE
> > for example, Opera not) requests text/xml and application/xml with a
> > higher quality than text/html.
>

Reply via email to