Skip to content

Throw an explicit error if the header value is not a string#53

Merged
fatso83 merged 1 commit intosinonjs:masterfrom
fatso83:explicit-error
Jun 1, 2018
Merged

Throw an explicit error if the header value is not a string#53
fatso83 merged 1 commit intosinonjs:masterfrom
fatso83:explicit-error

Conversation

@fatso83
Copy link
Copy Markdown
Contributor

@fatso83 fatso83 commented Jun 1, 2018

According to RFC7230 (last paragraph), http fields have used to be text and new headers should continue to do so, restricting the values to consist of US-ASCII octets.

This test is not so strict, but we avoid a whole range of errors by just checking if the value is a string.

Ref #51 and #48

According to RFC7230, http fields have used to be text and new
headers should continue to do so, restricting the values to consist
of US-ASCII octets.

This test is not so strict, but we avoid a whole range of errors
by just checking if the value is a string.

Ref sinonjs#51, sinonjs#48 and https://tools.ietf.org/html/rfc7230#section-3.2.4
@fatso83 fatso83 merged commit da7324b into sinonjs:master Jun 1, 2018
@fatso83 fatso83 deleted the explicit-error branch June 1, 2018 09:45
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

Successfully merging this pull request may close these issues.

1 participant