- Last Change:
- Clone URL:
ssh://anonymous@rsadowski.gothub.org:2242/httpd.git
- ECDSA:
SHA256:Oq94TREAyXnZDrdacYaMwJnEVSPH4q+LaRHm/zHWzEY
- ED25519:
SHA256:ifzNYlBwG2RJUJ5G0c/Ec/Ggry4qeZBlg2SMMkdmHm8
- RSA:
SHA256:ic1xfYGl/bQ07MLkmBh3GjgznuKfAzIxsUmla82R9GY
Commit Briefs
reject obs-fold with 400 (RFC 9112 5.2) (obs-fold)
Replace silent kv_extend normalisation with an unconditional 400. RFC 9112 5.2 explicitly permits rejection; it is the safer choice over SP replacement, which hides parser ambiguity downstream.
Import regress from base (devel)
usr.sbin/httpd: add cache controls for static files (main)
Teach httpd to advertise static file revalidation by default with Cache-Control: no-cache, preserving the existing Last-Modified and If-Modified-Since flow; add a [no] static-cache-control directive for opting out, and advertise Vary: Accept-Encoding whenever gzip-static is enabled. OK: claudio@
usr.sbin/httpd: inherit gzip-static in locations
Location configuration inherited most server level options but dropped gzip-static, so requests matching a location skipped static gzip lookup even when the parent server enabled it. Add an explicit no gzip-static state and inherit the gzip flag pair only when the location has not set either form, preserving location specific overrides. Reported by and OK: job@
Standardize logging with bgpd
Tweak and OK claudio@
remove empty server_http_init
OK claudio
Error out on presence of Content-Length and Transfer-Encoding headers
for GET, HEAD and other methods that should have no body. Ignoring the Content-Length header makes httpd vulnerable to HTTP request smuggling. A crafted GET request may embed an extra HTTP request which could bypass a proxy or WAF but then is handled by httpd. Remove the special case for TRACE and CONNECT in the Content-Length handling. Move those checks into the method switch at the end of the header parsing phase and by that also cover more methods including GET and HEAD. If either header is present simply abort the connection, nobody should send extra data along GET and HEAD requests. Add an an explicit HTTP_METHOD_TRACE case above the default case to indicated that we deliberately don't handle TRACE requests. This security vulnerability was found by Nicola Staller of SySS GmbH. With and OK rsadowski@ previous version also OK florian@
In server_read_httpchunks() do not blindly enable the bufferevent.
This leads to a use-after-free since the bev->readcb() call could free the memory holding the bev right before the bufferevent_enable() call. Reported by Pontus Stenetorp. OK florian@ rsadowski@
Slightly iprove a confusing wording in the parse.y manuals:
The things that need quoting are not necessarily "argument names", and not even necessarily "names" at all, so just talk about "arguments". "I guess?" florian@ and no objection from otto@, both back in July 2025. Actually, the quoting rules are more complicated than the text makes believe, but i do not know how to better describe them. It may not be easy because some suspect the implementation may be somewhat adhoc rather than based on cleary defined lexical rules.
