Skip to content

Commit

Permalink
doc: clarify duplicate header handling
Browse files Browse the repository at this point in the history
This commit documents how duplicate HTTP headers are handled.

PR-URL: #3810
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
  • Loading branch information
bengl authored and rvagg committed Dec 4, 2015
1 parent d94abad commit 852b4c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/api/http.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,16 @@ Example:
// accept: '*/*' }
console.log(request.headers);

Duplicates in raw headers are handled in the following ways, depending on the
header name:

* Duplicates of `age`, `authorization`, `content-length`, `content-type`,
`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,
`last-modified`, `location`, `max-forwards`, `proxy-authorization`, `referer`,
`retry-after`, or `user-agent` are discarded.
* `set-cookie` is always an array. Duplicates are added to the array.
* For all other headers, the values are joined together with ', '.

### message.httpVersion

In case of server request, the HTTP version sent by the client. In the case of
Expand Down

0 comments on commit 852b4c0

Please sign in to comment.