Skip to content

Send Connection: Upgrade with conventional casing - #46

Open
ARAYN7011 wants to merge 1 commit into
elixir-mint:mainfrom
ARAYN7011:fix-connection-upgrade-casing
Open

ARAYN7011 wants to merge 1 commit into
elixir-mint:mainfrom
ARAYN7011:fix-connection-upgrade-casing

Conversation

@ARAYN7011

Copy link
Copy Markdown

Fixes #42.

Some servers (e.g. Caddy-fronted ones) reject the upgrade request when the Connection header value is lowercase upgrade. Header values are case-insensitive, and maintainers agreed in the issue to switch to Upgrade.

Changes: Connection: Upgrade in Mint.WebSocket.Utils.headers/2; the existing header-casing tests now assert the value (it fails before, passes after).

Test plan: mix format --check-formatted; mix test test/mint/web_socket_test.exs:261 :271 and non-autobahn unit tests pass. The remaining tests in the file need a network server and the Autobahn suite needs docker, so I couldn't run them here.

AI disclosure: this PR was prepared with AI assistance (Claude Code).

Some servers (e.g. behind Caddy) reject the lowercase "upgrade" token.
Option values are case-insensitive per RFC 9110, so use "Upgrade".

Closes elixir-mint#42

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lowercase "upgrade" value in Connection header may prevent connection upgrade

1 participant