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

Server example is broken with ETag header #30

Open
skligys opened this issue May 20, 2018 · 3 comments
Open

Server example is broken with ETag header #30

skligys opened this issue May 20, 2018 · 3 comments

Comments

@skligys
Copy link

skligys commented May 20, 2018

The example at examples/server.rs breaks when I add one more header after line 36,
https://github.com/stepancheg/rust-http2/blob/master/examples/server.rs#L36 :

resp_headers.add("ETag", "12345678901234567890");

Tested with Firefox 60.0.1 and Google Chrome 65.0, in both cases no response comes back with the above line added to the server example. Tried to debug but got all lost in futures.

@stepancheg
Copy link
Owner

I'm not sure, but probably that's because HTTP/2 headers must be lower case (etag, not ETag). If it's the case rust-protobuf should probably automatically convert names to lower case.

@stepancheg
Copy link
Owner

BTW, for debugging it's useful to execute with RUST_LOG=httpbis=debug, which prints something useful sometimes.

@skligys
Copy link
Author

skligys commented May 22, 2018

Thanks for suggestions. RUST_LOG=httpbis=debug did not print anything but changing "ETag" into "etag" fixed the hang.

Would be nice to either loudly fail or automatically map non-lowercase header names into lowercase.

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

No branches or pull requests

2 participants