Akamai example is broken on negotiated ALPN
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 382
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 9
Description
The akamai example (https://github.com/hyperium/h2/blob/master/examples/akamai.rs) is broken on the assert_eq!(Some(ALPN_H2.as_bytes()), negotiated_protocol) statement.
Can easily be "fixed" by moving it to example.com instead, but given that a lot of tests make use of akamai I imagine you have good reasons for wanting to use their server.
Seems the ALPN is not returned in the location supported by rustls. It does contain ALPN data in 1.3 encryption, but didn't dive deep enough to see if that indeed contains h2 confirmation or not. Forcing it to tls 1.2 also doesn't change anything. example.com server does return the h2 ALPN back as selection.
I don't mind submitting a patch for it, but didn't know what you prefer here. Whatever the case be, currently the example fails.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/akamai.rs and reproduce the failure at the assert_eq!(Some(ALPN_H2.as_bytes()), negotiated_protocol) check. Compare the negotiated ALPN behavior with example.com and the documented TLS 1.2/1.3 cases. Done means the Akamai example runs successfully with a valid HTTP/2 ALPN confirmation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100