Commit 8d1a3d6
committed
fix: Drop a handler's Content-Length when a stream is compressed
A compressed stream goes out chunked, and the JDK's chunked branch sets
Transfer-encoding without clearing a Content-Length the handler put on
the response — so both framing headers reached the wire together. Before
this branch a sized stream passed its real length, which made the JDK
overwrite that header, so the conflict is new.
The declared length also describes the uncompressed body, so it is wrong
on the wire regardless of framing. renderEmpty already removed it for
the same reason; renderStream now does too.1 parent e25665c commit 8d1a3d6
2 files changed
Lines changed: 17 additions & 0 deletions
File tree
- src
- main/java/com/retailsvc/http/internal
- test/java/com/retailsvc/http/internal
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
400 | 415 | | |
401 | 416 | | |
402 | 417 | | |
| |||
0 commit comments