httpbin icon indicating copy to clipboard operation
httpbin copied to clipboard

Crash when passing an accent in payload (via headers)

Open thbar opened this issue 1 year ago • 1 comments

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).

thbar avatar Jun 18 '24 06:06 thbar

(removed mention of HTTP2, which I didn't document properly)

thbar avatar Jun 18 '24 06:06 thbar