-
Notifications
You must be signed in to change notification settings - Fork 226
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
HeaderName::from_static
requires all-lowercase HTTP2 compatible hea…
#267
HeaderName::from_static
requires all-lowercase HTTP2 compatible hea…
#267
Conversation
Also it's unclear to me why none of the existing tests caught this. |
This was introduced in d661f57 CC @application-developer-DA |
780805a
to
f7d04ae
Compare
Oh, we missed this case somehow, thanks @sdroege.
It seems like this particular panic may only happen when an invalid |
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.
Should we instead just call to_lowercase()
? Would look a bit more elegant (and less duplication of code), but has a greater runtime cost. However, that runtime cost is probably negligible since it only kicks in when the user passes the poorly formed Request
to tungstenite
(e.g. most users that just use connect
are unlikely to be affected by this runtime penalty).
That would be the other option. I can update the PR accordingly, your decision which variant you prefer :) |
Well, calling That's btw called implicitly by the |
I think I would prefer the option with |
…der names and was passed header names with uppercase characters instead, which made it panic.
f7d04ae
to
1a48959
Compare
Sure, updated accordingly |
Thanks! 👍 |
Can you release a 0.17.2 with this fix in the near future? |
Sure! I'll try to publish it today along with the updated (bugs like this we try to update and push fast) |
Nice, thanks! I noticed this btw from a user of async-tungstenite. I've released a version of that using tungstenite 0.17 during the weekend. |
This is to make sure that we don't panic anymore in such cases: #267
This is to make sure that we don't panic anymore in such cases: snapview#267
…der names
and was passed header names with uppercase characters instead, which
made it panic.