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

Fail upon invalid HTTP header field name #173

Merged
merged 1 commit into from
Jan 3, 2015

Conversation

ixti
Copy link
Member

@ixti ixti commented Jan 3, 2015

Disallows to pass invalid header field names like:

  • "Foo Bar" (using spaces)
  • " Foo-Bar" (leading and/or tailing spaces)
  • "Foo:Bar" (using separator field)

See http://tools.ietf.org/html/rfc7230#section-3.2 and specifically field-name syntax for details.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) when pulling 8b8cae1991164d1aa0a68d940625e9f552ee3080 on improvement/fail-on-invalid-header-name into 1d00907 on master.

@ixti ixti force-pushed the improvement/fail-on-invalid-header-name branch from 8b8cae1 to bcda58f Compare January 3, 2015 20:22
@ixti ixti merged commit bcda58f into master Jan 3, 2015
@ixti ixti deleted the improvement/fail-on-invalid-header-name branch January 3, 2015 20:23
@tarcieri
Copy link
Member

tarcieri commented Jan 3, 2015

One note on this: There is the traditional wisdom of "be liberal in what you accept and strict in what you send".

That said, I'm not sure that "wisdom" makes sense if we care about security. Maybe we should start favoring correctness.

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.

3 participants