mirror of
https://github.com/3proxy/3proxy.git
synced 2026-10-28 22:05:48 +08:00
A request to a parent HTTP proxy went as two writes, the line as the client sent it from req and then the rest of the headers from buf, held together with TCP_CORK, which does not help over TLS nor with headers bigger than a segment. The line now goes back to absolute form where it is: a request's header block is read HDRFRONT (300) bytes into clibuf, room for http://, a host name of 256 characters and a port; the method moves down into it and the scheme and authority go in after it, and line and headers are sent in one piece. Where they do not fit, or the headers are in a buffer of their own by then, both are put together in one. TCP_CORK is gone. The scheme and authority of a request are kept for that (auth), from its line or, for a request with a path only, its Host header; the last one is what the next request on the connection is compared with. A CONNECT line is kept whole in buf. The request filters are given the line in absolute form in a buffer of their own, made only when there are some, as req was. req is the copy logged and nothing else: at most REQMAX (6 KB) of the line, "..." after what is cut, never a reason to refuse the request. The headers this proxy adds are built in a buffer on the stack, of bounded parts, and put after the header block once there is room for them, in a standalone proxy too, which never asked for it. HDRRESERVE is 1 KB. Tests: through a parent a POST arrives with its line in absolute form, its headers and body whole; user and password in the URL; headers in a buffer of their own (a data filter) put together with the line; a 7 KB request line served whole and logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| admin.py | ||
| auto.py | ||
| counters.py | ||
| dnspr.py | ||
| httpsrv_auth.py | ||
| httpsrv_files.py | ||
| httpsrv_keepalive.py | ||
| httpsrv_ops.py | ||
| httpsrv_parsing.py | ||
| httpsrv_proxypass.py | ||
| httpsrv_rules.py | ||
| ipv6.py | ||
| ktls.py | ||
| maxconn.py | ||
| parent_failover.py | ||
| parent_ports.py | ||
| parent_weights.py | ||
| pcre.py | ||
| portmap.py | ||
| proxy_headers.py | ||
| proxy_http.py | ||
| reattach.py | ||
| reload.py | ||
| socks.py | ||
| splice.py | ||
| ssl.py | ||
| takeover.py | ||
| timeouts.py | ||
| tlspr.py | ||
| transparent.py | ||
| udploop.py | ||
| unixsock.py | ||