-
Notifications
You must be signed in to change notification settings - Fork 3
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
[POA-1519] Allow HTTP response without reason phrase #214
Conversation
Technically, the RFC requires a space even if the reason phrase is empty, but at least one service has been observed to violate this. Add unit tests for both correct and incorrect blank reason phrase, and a one reproducing the original error to verify that Go's http parser is fine with this.
Can you add where we observed this and how you found that this was the case? Empty reason phrase sounds skeptical, since I don't think we would have added any special handling in the Application layer for the service to do this. |
input: "HTTP/1.1 200\r\n", | ||
expectedDecision: akinet.Accept, | ||
}, | ||
// This is technically legal, as the reason string can be zero bytes long. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we can just write This is technically legal as reason string is optional
for better readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is less clear what "optional" means than the specific thing this test is demonstrating
The TCPdumps demonstrating the problem are in https://postmanlabs.atlassian.net/browse/POA-1519; I didn't want to be more specific about Postman internal services in a public repository. |
Technically, the RFC requires a space even if the reason phrase is empty, but at least one service has been observed to violate this. Add unit tests for both correct and incorrect blank reason phrase, and a one reproducing the original error to verify that Go's http parser is fine with this.