-
Notifications
You must be signed in to change notification settings - Fork 132
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
Adding header to previous empty value results in incorrectly formatted message #53
Comments
Yep I see. Thanks for the report. |
Thanks for the fix. It looks like the AcceptLanguageParserTest is broken as a result of these changes. |
Yes, this is a bit of a complicated situation. I am away for a couple of days, will check it out on Wednesday. |
Just adding this here for consideration.
The test is technically illegal, but the stack shouldn't enforce legality of this header to support use-cases related to broken clients and creation of torture tools meant to test 3rd parties against reasonably malformed headers. Combined with the fact that this test is in the TCK which is the spec benchmark we can give it more weight towards the freedom. I am curious if your use case could get away gracefully by using the
|
Our use case is to add extra Supported header values on top of what was already provided, rather than overwriting and replacing with our own. We could workaround this by querying for this specific case of an empty header value, it just seemed like something that would be better to handle in the stack, since adding a non-empty value to an already empty value is accepted, but produces an invalid message. |
test is not working anymore since the fix of the bug usnistgov#53 in 2012 and I think it is legitimate
test is not working anymore since the fix of the bug usnistgov#53 in 2012 and I think it is legitimate
test is not working anymore since the fix of the bug usnistgov#53 in 2012 and I think it is legitimate
If you add a header with a non-empty value to a message containing the same header with an empty value, the result is an incorrectly formatted message. For example, given an existing message of:
Adding a "Supported: timer" header to that message results in the following:
It's a reasonable expectation for the value to be "Supported: timer" after adding the new header, since it's effectively overwriting the initial empty value of "no extensions are supported" as specified in RFC 3261, section 20.37.
The text was updated successfully, but these errors were encountered: