Commit 6810b2b
Apu Islam
feat(http2): implement 103 Early Hints support
Add complete HTTP/2 103 Early Hints implementation with client and server support:
- Add InformationalSender extension for server-side hint transmission via mpsc channel
- Create InformationalCallback system for client-side informational response handling
- Extend HTTP/2 client builder with informational_responses() configuration method
- Implement informational response polling in h2 client task with callback invocation
- Add server-side informational response forwarding using h2's send_informational API
- Include extensive integration tests covering multiple scenarios and edge cases
- Add complete working example with TLS, resource preloading, and performance monitoring
- Update Cargo.toml with local h2 dependency and example build configuration
The implementation enables servers to send resource preload hints before final responses,
allowing browsers to start downloading critical resources early and improve page load
performance. Clients can register callbacks to process 103 Early Hints and other
informational responses.
Closes #3980, #24261 parent 4e2483a commit 6810b2b
File tree
11 files changed
+2156
-7
lines changed- examples
- src
- client/conn
- proto
- h1
- h2
- tests
11 files changed
+2156
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
| 92 | + | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
| |||
202 | 206 | | |
203 | 207 | | |
204 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
205 | 214 | | |
206 | 215 | | |
207 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
0 commit comments