Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple the same headers in request #525

Closed
SshPwd opened this issue Oct 7, 2016 · 1 comment
Closed

Multiple the same headers in request #525

SshPwd opened this issue Oct 7, 2016 · 1 comment

Comments

@SshPwd
Copy link

SshPwd commented Oct 7, 2016

From http RFC:

Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma. The order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded.

http -v GET localhost:12345 X-Your-Some-Header:"yo yo" X-Your-Some-Header:"bar"

GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: localhost:12345
User-Agent: HTTPie/0.9.4
X-Your-Some-Header: bar
localhost: 12345
@jkbrzt
Copy link
Member

jkbrzt commented Oct 12, 2016

Duplicate of: #130

As a work-around you can do the concatenation yourself:

http -v GET localhost:12345 X-Your-Some-Header:"yo yo, bar"`

@jkbrzt jkbrzt closed this as completed Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants