Sergey Beryozkin wrote:
> Hi
>
>
>> I am reluctant to put logic directly in Jersey that does not obey the
>> Accept processing rules.
>>
>> Perhaps the cleanest solution is to write a filter that checks the
>> User-Agent header and modifies the Accept header accordingly (by
>> simply prefixing "text/html," to the Accept header).
>>
>
> +1
>
>> Can this easily be done using a servlet filter?
>>
>> But... we should probably add a filter concept to Jersey...to make it
>> really easy to modify the request or response.
>
> what about JAX-RS :-) ?
>
:-) this would require standardizing lower-level mutable
request/response structures on which filters in general would need to
operate. IIRC the 311 EG were reluctant to go down this route, my
opinion is given the schedule the group is committed to i doubt there
will be time to do anything for 1.0 even if consensus could be achieved.
IMHO the right place to do this from a standardization perspective is to
improve the Servlet HTTP request/response ifaces (perhaps taking stuff
from JAX-RS e.g. parts of UriInfo, HttpHeaders, MultivaluedMap etc) and
enable such classes/interfaces to be reusable in other frameworks
instead of them having to make up their own request/response wrappers.
Paul.
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109