Commit 39c46f6
authored
Default the :http backend to HTTP/1.1 on HTTP.jl 2.x (#100)
* Default the :http backend to HTTP/1.1 on HTTP.jl 2.x
HTTP.jl 2.x defaults to prefer_http2=true and its :auto ALPN silently
upgrades any capable TLS server to HTTP/2. The streaming abort model
added in #98 (interrupt the read task + close the stream when the
consumer closes the channel) assumes one request per connection, as in
HTTP/1.1. Over a reused HTTP/2 connection each aborted watch/streaming
cycle leaves per-stream state behind, and after a few cycles the shared
connection read loop wedges (observed as a hung Kubernetes watch: the
socket in CLOSE-WAIT with the h2 read loop parked in read_frame!).
Pin the transport to HTTP/1.1 (protocol=:h1) for both the plain and
streaming request paths, guarded by the existing _HTTP_V2 check (1.x has
no protocol keyword). The choice is overridable per client via the
:http_protocol option (:auto or :h2) for callers who want the 2.x
default.
* update patch version1 parent 7bc9734 commit 39c46f6
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
76 | 88 | | |
77 | 89 | | |
78 | 90 | | |
| |||
265 | 277 | | |
266 | 278 | | |
267 | 279 | | |
| 280 | + | |
268 | 281 | | |
269 | 282 | | |
270 | 283 | | |
| |||
282 | 295 | | |
283 | 296 | | |
284 | 297 | | |
| 298 | + | |
285 | 299 | | |
286 | 300 | | |
287 | 301 | | |
| |||
0 commit comments