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

make go-chef HTTP headers compliant with RFC 2616 (HTTP/1.1) and go1.6 #75

Merged
merged 1 commit into from
Feb 19, 2016

Conversation

theckman
Copy link
Contributor

RFC 2616 § 4.2 specifies that HTTP headers cannot contain spaces. A space being included in the header is in violation of the HTTP/1.1 standard. Unfortunately, Go 1.6 introduced a change where they outright reject requests, before the your HTTP handler is invoked, if any header contains a space in the name:

This changeset alters the SignRequest function so that the Hashed Path header is no longer sent to the Chef Server. The Chef authentication documentation clearly indicates that this header is NOT required to be sent over HTTP as part of authentication. The value is, however, used as part of the generation of the X-Ops-Authorization header.

Review on Reviewable

[RFC 2616 § 4.2](https://www.ietf.org/rfc/rfc2616.txt) specifies that HTTP headers **cannot** contain spaces. A space being included in the header is in violation of the HTTP/1.1 standard. Unfortunately, Go 1.6 introduced a change where they outright reject requests, before the your HTTP handler is invoked, if **any** header contains a space in the name:

* golang/go@c052222

This changeset alters the `SignRequest` function so that the `Hashed Path` header is no longer sent to the Chef Server. The Chef authentication documentation clearly indicates that this header is **NOT** required to be sent over HTTP as part of authentication. The value is, however, used as part of the generation of the `X-Ops-Authorization` header.
@fujin
Copy link

fujin commented Feb 19, 2016

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

fujin pushed a commit that referenced this pull request Feb 19, 2016
make go-chef HTTP headers compliant with RFC 2616 (HTTP/1.1) and go1.6
@fujin fujin merged commit 9ecc09c into go-chef:master Feb 19, 2016
@fujin
Copy link

fujin commented Feb 19, 2016

cheers @theckman

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.

2 participants