Re: Does curl do anything special with non-ASCII characters in HTTP header values?
Date: Sat, 19 Sep 2020 10:22:39 -0600
On 2020-09-19, at 09:59:42, Dan Fandrich via curl-users <curl-users_at_cool.haxx.se> wrote:
> On Sat, Sep 19, 2020 at 12:19:57AM +0000, Steve Perkins via curl-users wrote:
>> curl --request POST --header "my-header: ø" --data "dummy payload" http://
> To curl, the value of the --header option is an opaque series of bytes which it
> sends along. The bytes you pass it in this case are in whatever your local
> character set is, probably UTF-8, but it might be ISO 8859/1 or something else.
> Whatever it is, it sounds like that's what the server wants.
Yes. Steve appears to be using curl to verify the behavior
of another utility. Curl passes; the other utility fails.
> Other clients are probably sending other bytes for that header. Are they
> hard-coded in a source code file? Maybe that source code file is in a different
> character set than the command-line you use. The program may need to perform a
> character set conversion (using iconv(3) or similar) before sending the bytes
> to the server.
A conventional encoding (RFC 1738; UTF-8) of the filename above would be: