Commit graph

2896 commits

Author SHA1 Message Date
Mohammed Al Sahaf
5dd16ff8d2
Merge branch 'master' into hurl-tests 2026-11-07 16:27:01 +03:00
Kévin Dunglas
9b07062e9b
fileserver: test hide against Windows trailing dot and space aliases (#8377) 2026-11-07 06:30:59 -05:00
Herman Slatman
31f9f0cb99
build(deps): update vulnerable deps (#8368)
* build(deps): update `github.com/smallstep/certificates` to `6d5a251f`

This drops `v3` of `go-jose`, and should silence vulnerability
scanners triggering on that and older versions of `v4`.

* build(deps): upgrade `github.com/klauspost/compress` to `v1.20.3`
2026-11-07 01:33:13 +03:00
Chris Oliver
b3d67c861d
reverseproxy: set a write deadline on websocket close messages (#8309)
* reverseproxy: set a write deadline on websocket close messages

Cleanup sends a Close control message to every attached websocket while
holding the tunnel tracker lock, during a config reload. If the peer has
stopped reading, the tunnel's copy goroutine is blocked writing to it and
the close message waits behind that write forever. The reload never
finishes and holds the config lock, so every later /load and /config
request hangs until Caddy is restarted.

Setting a write deadline before the close message unblocks both writes.
The connection is closed right after, so the deadline is never cleared.

* Add bot disclosure

* reverseproxy: make close control timeout a const, harden stalled-peer test

* Delete BOT_DISCLOSURE.md

Signed-off-by: Francis Lavoie <lavofr@gmail.com>

* reverseproxy: bound each batch of websocket close messages by one deadline

The close loops are serial and hold the tunnel tracker lock, so a
per-connection write timeout let N stalled peers hold a reload for N
times the timeout. Compute one absolute deadline per batch instead,
and skip the best-effort close frame on connections that cannot set a
write deadline rather than risk the hang.

Extended CONNECT streams gain SetWriteDeadline through
http.ResponseController. For HTTP/1 upgrades, net/http returns the
upstream socket inside a body that hides its deadline methods, so the
upstream close message was never bounded; record the connection from
the request's ClientTrace and write the close message to that socket.

Restores the TODO about being the exclusive writer, per review.

* reverseproxy: make websocket close tests deterministic

Per review, the stalled-peer tests use net.Pipe instead of real TCP:
it is unbuffered and lets one write through at a time, so a close
message waits behind a stuck copy write without large allocations or
sleeps. The batch test checks that graceful closes share one deadline
instead of timing cleanup.

The HTTP/1 upstream close test now runs a real upgrade through
ServeHTTP and the transport, so it fails if the GotConn hook is
removed. The choice of upstream close writer moves into
upstreamCloseWriter, with a table test for the HTTP/2 and HTTP/3 case.

* reverseproxy: record the upstream conn with atomic.Pointer

Per review, store the connection from the GotConn hook in an
atomic.Pointer[net.Conn] instead of a mutex-guarded holder type.

Rename upstreamCloseWriter to upstreamWriteCloser. It returns
io.ReadWriteCloser, since both the body and the recorded socket are
one, so gracefulClose keeps its original io.ReadWriteCloser parameter.

* reverseproxy: share one close deadline across detached trackers

Per review, an upstream removal notifies every stopped tracker in
turn, and each close loop holds its own lock, so a deadline per
tracker let N trackers with stalled peers hold a reload for N times
the timeout. Compute one absolute deadline in
notifyDetachedTunnelTrackersOfUpstreamRemoval and pass it through to
closeConnectionsForUpstream.

Add a test with two stopped trackers holding stalled net.Pipe peers
that asserts both graceful closes receive the same deadline.

* reverseproxy: simplify the websocket close deadline change

Fold the two tunnel close loops into closeConnectionsLocked, so the
shared-deadline rule and its rationale live in one place. Replace the
per-tracker closeWriteTimeout field, which production never varied,
with a package variable that tests shorten.

Record the upstream socket only for websocket requests, since only
their graceful close reads it, and store a copy of the connection
rather than the address of the hook's parameter. Use the package's
caddy.CtxKey convention for the context key.

Share the upgrade tunnel fixture between the half-close test and the
upstream close message test.
2026-11-06 10:49:16 +00:00
Suganraj
0da7b08e81
reverseproxy: remove unreachable isBidirectionalStream (#8366) 2026-11-06 10:46:43 +00:00
Mohammed Al Sahaf
4bca590892
Merge branch 'master' into hurl-tests 2026-11-05 20:05:27 +03:00
Zen Dodd
f4d9826bf2
reverseproxy: simplify WebSocket header handling (#8365) 2026-11-05 04:45:23 -05:00
Zen Dodd
abde11bc1f
tests: stabilise HTTP/2 idle timeout test (#8351) 2026-11-05 09:10:39 +00:00
Zen Dodd
a0cb97b322
reverseproxy: preserve RFC WebSocket key casing (#8363) 2026-11-05 03:54:16 -05:00
duongynhi000005-oss
dcad5b2359
reverseproxy: remove parsed client key during extended CONNECT downgrade (#8297) (#8360)
When downgrading an HTTP/2 or HTTP/3 extended CONNECT WebSocket request
to HTTP/1.1, delete any parsed client-supplied Sec-WebSocket-Key header
prior to installing Caddy's generated 16-byte random key. This prevents
request header operations from canonicalizing and combining both keys
into duplicate Sec-WebSocket-Key headers upstream.

Signed-off-by: duongynhi000005-oss <duongynhi000005@gmail.com>
2026-11-05 07:50:36 +00:00
Kévin Dunglas
3d005442e4
fastcgi: reject paths whose escaped form selects another script (#8357) 2026-11-04 18:02:42 -05:00
Kévin Dunglas
70dca34a36
fastcgi: let configured env variables override request headers (#8358) 2026-11-04 18:02:29 -05:00
Julien Voisin
c8492563ee
caddyhttp: presize buffers in hot paths to reduce allocations (#7842)
* caddyhttp: presize buffers in hot paths to reduce allocations

Right-size three per-request allocations that previously grew from a
nil/empty backing array, causing repeated reallocation:

- CleanPath: pre-Grow the strings.Builder used when slash collapsing is
  disabled, instead of letting it reallocate as runes are appended
- headers: presize the rewritten value slice in HeaderOps.ApplyTo's Set
  loop instead of appending from nil
- reverseproxy: presize the weights slice in WeightedRoundRobinSelection
  .Select

This commit also adds benchmarks exercising each path. Measured with benchstat
with count=20 and GOMAXPROCS=1, with p=0.000:

                                    sec/op                  B/op              allocs/op
CleanPathNoCollapse       1013.4n -> 828.6n  (-18.23%)  120->64  (-46.67%)   4->1  (-75.00%)
HeaderOpsApplyToSet       1262.0n -> 955.8n  (-24.27%)  255->152 (-40.39%)   9->6  (-33.33%)
WeightedRoundRobinSelect   215.8n -> 200.3n  ( -7.20%)  112->96  (-14.29%)   2->2  (N/A)

* caddyhttp: presize strings.Builder in query rewrite and path matcher

Two builders whose output size is bounded by a known input length were
growing from empty, causing repeated reallocation. Seed each with a
capacity hint:

- rewrite.buildQueryString: pre-Grow to len(qs) (runs per request when
  rewrite query manipulation is configured)
- MatchPath.matchPatternWithEscapeSequence: pre-Grow to len(escapedPath)
  (reached only when a path pattern contains % escape sequences)

Adds a benchmark for buildQueryString, measured with benchstat:

BuildQueryString:
	- sec/op  965.2n -> 743.3n  (-22.99%)
	- B/op 248->80  (-67.74%)
	- allocs/op 5->1  (-80.00%)

The builder previously reallocated four times per call. The matcher path
is cold and not separately benchmarked.

* chore: add benchmark headers

---------

Signed-off-by: Julien Voisin <jvoisin@users.noreply.github.com>
2026-11-04 20:26:53 +00:00
Kévin Dunglas
7145e5eba8
fastcgi: reject Win 8.3 aliases and alt data streams paths (#8356) 2026-11-04 14:34:04 -05:00
Kévin Dunglas
bd56cc1748
fastcgi: take HTTP_HOST from the routed host only (#8355) 2026-11-04 14:32:20 -05:00
Kévin Dunglas
cf1b1121e7
httpcaddyfile: add Helper.IsNamedRoute (#8354) 2026-11-04 14:30:45 -05:00
Kévin Dunglas
b5d67d6540
fileserver: only match a dir when the pattern ends by / (#8352) 2026-11-04 10:45:35 -05:00
Zen Dodd
fbfc061e70
caddyhttp: detach streams at the server writer boundary (#8346) 2026-11-04 17:36:00 +10:00
Steffen Busch
644dbe695d
fileserver: configure plain browse time format (#8084) 2026-11-04 17:05:11 +10:00
dependabot[bot]
7bb95a47b2
build(deps): bump github.com/go-jose/go-jose/v4 from 4.1.5 to 4.1.6 (#8299)
Bumps [github.com/go-jose/go-jose/v4](https://github.com/go-jose/go-jose) from 4.1.5 to 4.1.6.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Commits](https://github.com/go-jose/go-jose/compare/v4.1.5...v4.1.6)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v4
  dependency-version: 4.1.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 06:47:57 +00:00
dependabot[bot]
ddd7475ed3
build(deps): bump the actions-deps group across 1 directory with 10 updates (#8340)
Bumps the actions-deps group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `7.0.0` | `7.0.1` |
| [step-security/harden-runner](https://github.com/step-security/harden-runner) | `2.19.4` | `2.22.3` |
| [actions/setup-go](https://github.com/actions/setup-go) | `6.5.0` | `7.0.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.1` | `7.0.2` |
| [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `7.2.3` | `7.3.0` |
| [golang/govulncheck-action](https://github.com/golang/govulncheck-action) | `1.0.4` | `1.1.0` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `4.1.0` | `4.1.2` |
| [anchore/sbom-action/download-syft](https://github.com/anchore/sbom-action) | `0.24.0` | `0.24.3` |
| [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.4.3` | `2.5.0` |
| [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) | `4.36.2` | `4.39.1` |



Updates `actions/checkout` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9c091bb21b...3d3c42e5aa)

Updates `step-security/harden-runner` from 2.19.4 to 2.22.3
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](9af89fc715...46b06cea07)

Updates `actions/setup-go` from 6.5.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](924ae3a1cd...b7ad1dad31)

Updates `actions/upload-artifact` from 7.0.1 to 7.0.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](043fb46d1a...cf430e030d)

Updates `goreleaser/goreleaser-action` from 7.2.3 to 7.3.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](f06c13b6b1...a4f02ab535)

Updates `golang/govulncheck-action` from 1.0.4 to 1.1.0
- [Release notes](https://github.com/golang/govulncheck-action/releases)
- [Commits](b625fbe08f...032d45514a)

Updates `sigstore/cosign-installer` from 4.1.0 to 4.1.2
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](ba7bc0a3fe...6f9f177880)

Updates `anchore/sbom-action/download-syft` from 0.24.0 to 0.24.3
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](e22c389904...66cbf4bc1f)

Updates `ossf/scorecard-action` from 2.4.3 to 2.5.0
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](4eaacf0543...fa7117db83)

Updates `github/codeql-action/upload-sarif` from 4.36.2 to 4.39.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8aad20d150...9b32540854)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-deps
- dependency-name: actions/setup-go
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions-deps
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-deps
- dependency-name: anchore/sbom-action/download-syft
  dependency-version: 0.24.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-deps
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.39.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-deps
- dependency-name: golang/govulncheck-action
  dependency-version: 1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-deps
- dependency-name: goreleaser/goreleaser-action
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-deps
- dependency-name: ossf/scorecard-action
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-deps
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-deps
- dependency-name: step-security/harden-runner
  dependency-version: 2.22.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 16:42:18 +10:00
sam-kota
c1c0ee5dad
httpcaddyfile: reject conflicting client_auth when merging TLS policies (#8306)
* httpcaddyfile: reject conflicting client_auth when merging TLS policies
* httpcaddyfile: use host and host:port site addresses in client auth conflict test
* httpcaddyfile: enhance client auth consolidation test to handle conflicting configurations
* httpcaddyfile: remove unnecessary blank line in conflict error handling
2026-11-04 16:39:36 +10:00
D'Ali Ben Macha
2147da70f7
caddyhttp: lower-case path patterns with placeholders at request time (#8343)
* caddyhttp: lower-case path patterns with placeholders at request time

Patterns with placeholders were lower-cased at provisioning, which
changed case-sensitive placeholder names such as {env.FOO}, while the
replaced values were never lower-cased and so could not match the
lower-cased request path. Leave such patterns untouched at provisioning
and lower-case the expanded pattern at request time.

Fixes #6387

* caddyhttp: restore the encoded separator path matcher tests
2026-11-04 16:37:26 +10:00
Francis Lavoie
468154121d
ci: release changelogs since the previous published release, and workflow hardening (#8341)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
2026-11-03 23:07:13 +00:00
Faiyaz Rahman
bbea66f2ec
reverseproxy: reduce lock contention in dynamic SRV and A upstreams (#7949)
* reverseproxy: reduce lock contention in dynamic SRV and A upstreams (#7946)

The shared SRV and A/AAAA caches held a global write lock across the DNS
lookup, so one slow or timing-out record blocked every unrelated
upstream source.

Lookups now run without the cache lock held, deduplicated per key with
singleflight. A per-key generation (stored on the cache entry, so it is
bounded by the cache cap) and a cache-wide epoch keep a lookup that was
in flight during ResetSRV/ResetAllSRV from writing its result back, and
are part of the singleflight key so callers after a reset do not join a
pre-reset lookup.

The shared lookup is detached from the request that started it and
bounded by its own 30s timeout; each caller still returns as soon as its
own context is done. Distinct lookups across both caches are capped by a
shared gate (64 running, 256 queued); beyond that they are shed, serving
a stale SRV entry if a grace period is set and one is cached.

SRV and A now share one cache implementation. AUpstreams also implements
CachingUpstreamSource (via new ResetA/ResetAllA), so retries purge its
cache entry like SRVUpstreams already did.

Rebased onto the move of this code into modules/internal/network (#7790,
#8252).

Fixes #7946

Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* network: backdate cache entries in TestShedLookups instead of a 1ns refresh

On Windows two close time.Now() calls can report no elapsed time, so an
entry seeded with a 1ns refresh could still be fresh and skip the shed
path entirely.

* network: move the shared cache and lookup gate into cache.go

dynamicupstreams.go keeps the SRV/A API; the generic cache, its
singleflight/generation handling and the lookup gate are not specific to
either record type. No functional change.

* network: preserve cache reset and grace semantics

---------

Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Co-authored-by: steadytao <mail@steadytao.com>
2026-11-03 08:37:50 +00:00
Venkatesh Panda
f89626aa55
caddyauth: Don't write into shared hash buffer when building cache key (#8278)
HTTPBasicAuth.correctPassword built its hash cache key with
append(account.password, plaintextPassword...). account.password is
shared by all requests and can have spare capacity, so short passwords
were written into the stored hash's backing array, causing a data race
between concurrent requests and potentially mixed-up cache keys.

Build the key in a fresh buffer instead, and add regression tests.
2026-11-03 08:21:45 +00:00
Kévin Dunglas
6cdffe9502
requestbody: enforce max_size early using Content-Length (#8337)
* requestbody: reject oversized Content-Length before the next handler

When max_size is set and the request declares a Content-Length above it, respond 413 right away instead of letting the next handler start and fail mid-read. Bodies of unknown length are still limited by MaxBytesReader. Both paths return the same error, so handle_errors sees no difference.

* caddytest: send unknown-length bodies in max_size placeholder tests

request_body now answers 413 for a declared Content-Length over max_size before the placeholder reads the body, so these tests no longer covered the read path and the direct respond one failed.

* requestbody: keep the body limited for error routes

Error routes get the same request, so wrap the body before the early 413 to stop them from reading past max_size.
2026-11-03 18:18:40 +10:00
Zen Dodd
fc2236fe43
core: resolve systemd socket descriptors by name (#8123)
* core: resolve systemd socket descriptors by name
* core: reject overflowing systemd descriptor indices
* internal: isolate systemd resolution
* chore: move integration
* core: simplify systemd descriptor lookup
2026-11-03 08:16:26 +00:00
D'Ali Ben Macha
482f867395
caddyfile: reject negative import argument indices (#8316)
{args[-1]} and {args.-1} parsed as -1 and indexed the args slice
directly, panicking with index out of range. Treat negative indices as
out of bounds, like indices past the end.
2026-11-03 08:15:36 +00:00
Zen Dodd
43653cfb65
rewrite: treat only valid percent encodings as escapes (#8345) 2026-11-03 03:11:06 -05:00
D'Ali Ben Macha
c168dbc4ca
admin: authorize remote requests matching any permission entry (#8317)
* admin: authorize remote requests matching any permission entry

enforceAccessControls rejected a request as soon as one permission entry
did not match its method or path, so only the first entry was usable.
Allow the request if any entry permits both, and deny only after all fail.

* admin: check every access entry that holds the client key

A key listed in several access control entries was only checked
against the first one; deny only after all of them are tried.
2026-11-03 07:05:42 +00:00
D'Ali Ben Macha
aeea18be86
reverseproxy: skip unavailable upstream with a single weighted_round_robin weight (#8320)
With fewer than two weights, WeightedRoundRobinSelection returned the
first upstream without checking that it is available.
2026-11-03 07:01:28 +00:00
D'Ali Ben Macha
cce035d7ad
fileserver: handle empty files in size try policies (#8322)
Use the chosen file info, not a zero size, to tell whether a candidate
was chosen, so smallest_size keeps an empty file and largest_size can
choose one.
2026-11-03 06:59:33 +00:00
D'Ali Ben Macha
dccce45660
reverseproxy: close upstream body when handle_response status is invalid (#8318)
When a handle_response status code did not evaluate to an integer, the
handler returned a 500 without closing the upstream response body,
leaking the connection.
2026-11-03 06:58:00 +00:00
Nguyen Thanh Dat
c645c2b439
rewrite: fix strip_path_suffix decoding a literal '%' as an escape (#8005) 2026-11-03 01:31:54 -05:00
Nguyen Thanh Dat
0759b29fe0
caddyhttp: correct path matcher doc on bare trailing wildcards (#8006) 2026-11-03 06:19:06 +00:00
Kévin Dunglas
c4d8caa2e7
caddyhttp: reject invalid and dots-only hosts on every protocol (#8328) 2026-11-03 06:12:03 +00:00
Krish Singh Hura
053be179d8
ci: test and release with Go 1.27 (#8210)
* caddyhttp: add HTTP/1 body reuse regression tests

* ci: test and release with Go 1.27

---------

Co-authored-by: steadytao <mail@steadytao.com>
2026-11-02 21:41:02 -07:00
EINIER FREYRE CORONA
f53b832c41
ci/cd: migrate to cosign v3 bundles and update installer to v4.1.0 (#7674)
* ci/cd: migrate to cosign v3 bundles for artifact signing

* ci/cd: update cosign-installer to v4.1.0 verified SHA

* ci/cd: use .sigstore.json extension for cosign bundles
2026-11-02 23:55:55 +00:00
a
98b0bbd477
go.mod: update x509roots/fallback (#8333) 2026-11-02 13:48:05 +03:00
Kévin Dunglas
1a870400e6
encode: use httpguts to look for Accept-Encoding in Vary (#8329) 2026-11-01 16:59:21 -05:00
Kévin Dunglas
84eaf50b7b
admin: better Cache-Control handling (#8330) 2026-11-01 16:58:15 -05:00
Kévin Dunglas
9dd12fdb5d
fileserver: hide the data directory when it is relative (#8327) 2026-11-01 15:57:49 -05:00
Kévin Dunglas
aea046c978
fileserver: don't match regular file when path ends by slash (#8326) 2026-11-01 15:57:10 -05:00
Kévin Dunglas
094172da84
rewrite: escape file matcher remainder before rewriting (#8325) 2026-11-01 15:53:43 -05:00
Kartik K
9d2cb35c75
caddyauth: check basic_auth username uniqueness after placeholder expansion (#8315) 2026-11-01 09:04:24 +00:00
hsdfat
6bfeb4f825
caddyauth: support third-party hash modules (#8063)
* caddyauth: Support third-party http.authentication.hashes modules

basic_auth and hash-password only accepted the built-in bcrypt and
argon2id algorithms, even though the http.authentication.hashes
namespace is documented as extensible. Look up any other algorithm
name among the installed hash modules instead, and list the available
ones when the name is not recognized.

The built-in algorithms keep their own hash-password flags; other
modules are provisioned and must implement Hasher to generate hashes.

Closes #6670

* caddyauth: Base64-encode non-MCF hashes from hash-password modules

hash-password printed module hashes as raw bytes, but basic_auth
base64-decodes any password that isn't in Modular Crypt Format, so the
output couldn't be used as-is. Encode non-MCF hashes as base64 and add
a round-trip test that provisions HTTPBasicAuth with the command output.

* caddyauth: always base64-encode third-party hash output
2026-11-01 02:34:51 +00:00
Francis Lavoie
9e5d4d42b1
reverseproxy: test WebSocket upgrades over Unix sockets (#7657)
* reverseproxy: Test that WebSockets + unix-sockets works

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Close temp file before reusing its path for the socket

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Strengthen unix socket WebSocket test, reuse tempSocketName helper

Check that upstream bytes sent with the 101 are delivered, echo a payload larger than any buffer, and verify the upstream connection closes when the client disconnects. Reuse the existing tempSocketName helper for all unix socket tests, which also closes the temp file descriptor the older tests leaked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:22:28 +10:00
jasper
61e9b223da
core: reject overlong ports in ParseNetworkAddress (#8277) 2026-10-31 21:57:28 -04:00
Kévin Dunglas
a72377a10d
encode: ignore request no-transform, vary identity responses on Accept-Encoding (#8301)
Co-authored-by: elee1766 <a@tuxpa.in>
2026-10-31 17:24:13 -04:00