httpbin
httpbin copied to clipboard
Crash when passing an accent in payload (via headers)
If one goes here:
- http://httpbin.org/#/Response_inspection/get_response_headers
- type "éphémère" and you'll get an error 500:
- https://httpbin.org/response-headers?freeform=%C3%A9ph%C3%A9m%C3%A8re
HTTP 1 headers encoding is a legacy subject (latin-1 etc), as mentioned here:
- https://github.com/elixir-mint/mint/issues/301
My hypothesis is the crash is completely accent-related (and linked to latin-1 <-> UTF-8 transcoding probably).
If one inputs "ephemere", the crash stops.
While a bit exotic, this point is essential for the content-disposition header, which gives the filename of the downloaded file (attachment, filename=xyz).
(removed mention of HTTP2, which I didn't document properly)