Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] How to prevent Jetty from sanitizing non-UTF-8 character in HTTP request?

I am using Jetty version '9.4.7.v20170914' and I have a requirement to reject any request which contains a non-UTF-8 character in the request URL or body.

While looking ar 'URIUtil' class, it seemed Jetty is catching the 'NotUtf8Exception' exception in  'decodePath' method and then replacing the non-UTF-8 character in 'decodeISO88591Path' method.

Is there a way to prevent Jetty from eating the 'NotUtf8Exception' exception?

Cheers,

Indra

Back to the top