mirror of
https://github.com/caddyserver/caddy.git
synced 2026-06-29 13:21:51 +00:00
Reorder serveWebTransport so the upstream is dialed first. If the upstream is unreachable or refuses the CONNECT, a proper 5xx is returned from the handler — the client's Dial() surfaces the real status instead of a successful upgrade followed by an opaque session close. Also apply `h.Headers.Response` (gated by `Require`, if configured) against the upstream response status/headers; the ops run on the client-visible response headers, which webtransport.Server.Upgrade flushes with the 200 OK. If the client-side upgrade fails after the upstream dial succeeded, close the upstream session cleanly. Integration test drives a dial to an unbound loopback port and asserts the client sees a 5xx status instead of a bare session close. |
||
|---|---|---|
| .. | ||
| caddyevents | ||
| caddyfs | ||
| caddyhttp | ||
| caddypki | ||
| caddytls | ||
| filestorage | ||
| internal/network | ||
| logging | ||
| metrics | ||
| standard | ||