users@jersey.java.net

Override Bad HTTP ACCEPT Header

From: Paul Hassinger <hassinger.paul_at_ipaul.com>
Date: Wed, 15 Apr 2009 15:35:43 -0500

I have web services that I only produce xml with.

I've noticed some browsers may possibly send HEADERS with a bad http
accept such as the following:

[failed to localize] bad.accept.field(HTTP
ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8)


How do I go about either:

- Since I have specified that the methods of the services produce xml,
why does it still need to check the header? How can I ignore parsing
this header for the method? Can I ignore it globally?

- Alternatively, can I, or how would I go about defaulting every
request to use my own specified Header, such as cleaning up the
browser input removing any HTTP ACCEPTs, anduse that instead of the
header from the browser?


Thanks,
Paul