Commit 409b9a4
proxy/http: fix duplicated EOH when rewriting absolute-form to origin-form
When forwarding HTTP/1.x absolute-form requests from the HTTP inbound, we
serialize a new request line/headers and then append the buffered remainder.
However, the remainder starts at the original End-Of-Headers (EOH, CRLFCRLF),
so we ended up emitting two consecutive CRLFCRLF boundaries. That breaks
parsing for some servers, especially with chunked bodies or JSON payloads.
Strip a leading EOH from the remainder before concatenation so only one header
terminator is present.
This change is minimal and only affects the Absolute target format path. CONNECT
and SOCKS remain pure tunnels.1 parent 3918d1c commit 409b9a4
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
165 | 171 | | |
166 | 172 | | |
167 | 173 | | |
| |||
0 commit comments