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

req.headers() does not contain the sec-websocket-key header. #1971

Closed
GavBog opened this issue Apr 30, 2023 · 4 comments · Fixed by #1972
Closed

req.headers() does not contain the sec-websocket-key header. #1971

GavBog opened this issue Apr 30, 2023 · 4 comments · Fixed by #1972
Labels
A-axum C-bug Category: This is a bug. E-easy Call for participation: Experience needed to fix: Easy / not much

Comments

@GavBog
Copy link

GavBog commented Apr 30, 2023

  • [✔️] I have looked for existing issues (including closed) about this

Bug Report

Version

axum v0.6.17
axum-core v0.3.4

Platform

MacOS

Description

I got all the headers from the websocket request using req: Request<Body> and req.headers()... This code works great except I noticed that the sec-websocket-key header was missing. If there is another way to get this header please let me know! This is my first time using axum. Thanks!

@GavBog
Copy link
Author

GavBog commented Apr 30, 2023

let sec_websocket_key = parts

@GavBog
Copy link
Author

GavBog commented Apr 30, 2023

I'm no where near qualified to work on this repository and I am sure that the code was structured this way for a reason but this seems to fix it.

https://github.com/GavBog/axum/commit/bdcade2793a4bb468cd3ca75cd2a1f94eb8e9214

@davidpdrsn
Copy link
Member

Oh yeah that shouldn't remove the header

@davidpdrsn davidpdrsn added C-bug Category: This is a bug. E-easy Call for participation: Experience needed to fix: Easy / not much A-axum labels Apr 30, 2023
@davidpdrsn
Copy link
Member

Fix published in 0.6.18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-axum C-bug Category: This is a bug. E-easy Call for participation: Experience needed to fix: Easy / not much
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants