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

Whitespace is not removed from field values in HTTP/2 or HTTP/3 #697

Closed
martinthomson opened this issue Jan 28, 2021 · 5 comments · Fixed by #791
Closed

Whitespace is not removed from field values in HTTP/2 or HTTP/3 #697

martinthomson opened this issue Jan 28, 2021 · 5 comments · Fixed by #791

Comments

@martinthomson
Copy link
Contributor

This claim in Section 5.5 is likely incorrect:

Leading and trailing whitespace in raw field values is removed upon field parsing (e.g., Section 5.1 of [Messaging]).

Does it need qualification (in some versions) or permission (could be removed)?

@reschke
Copy link
Contributor

reschke commented Feb 2, 2021

"could be removed" or "can be removed" seems accurate.

That said, isn't this a potential future interop problem? Shouldn't HTTP/2 and HTTP/3 mandate removal as well?

@mnot
Copy link
Member

mnot commented Feb 5, 2021

I think the question here is when it's removed. My understanding is that it is removed for the purposes of matching ABNF, and it's removed when the value is used, but it's not necessarily removed automatically when an implementation hands a value to an application.

@reschke
Copy link
Contributor

reschke commented Feb 5, 2021

But if the WS is not removed before the value is passed to the application, it might not be removed at all.

What do HTTP/2 implementations do here?

@reschke reschke added the discuss label Feb 6, 2021
@royfielding royfielding self-assigned this Feb 11, 2021
@mnot
Copy link
Member

mnot commented Feb 11, 2021

Discussed in Feb 21 interim; need to focus on interpretation of field, not e.g., forwarding. Should be a requirement.

@annevk
Copy link
Contributor

annevk commented Mar 4, 2021

It would have nice if it was an error to have leading/trailing field value whitespace in newer HTTP versions. Probably too late now, though perhaps not for H/3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

5 participants