whitequark / rack-utf8_sanitizer

Rack::UTF8Sanitizer is a Rack middleware which cleans up invalid UTF8 characters in request URI and headers.
MIT License
314 stars 53 forks source link

Skip sanitizing the request body if the charset is non-utf-8 #84

Closed hibariya closed 10 months ago

hibariya commented 10 months ago

Fixes #83

With this change, sanitizing the request body will be skipped when the charset is other than UTF-8. This change should only affect requests that have a content-type header with non-utf-8 charset parameter.

whitequark commented 10 months ago

Thanks!