Skip to content

Make MAX_LINE configurable #1471

@dangeReis

Description

@dangeReis

We currently have a cookie line header of 8718 characters, which is larger than MAX_LINE setting of 8192. Can this either be bumped up to 16K, or better yet be configurable in the ENV? Also it would be nice if a proper error message was returned, we are currently getting

HTTP/1.1 400 Bad Request
Date: Thu, 06 Jun 2024 16:09:28 GMT
Content-Type: text/plain
Content-Length: 77
Connection: keep-alive

Failed to open a WebSocket connection: did not receive a valid HTTP request.

Which isn't very helpful.

https://github.com/python-websockets/websockets/blame/01195322d2620a44039b716cb93c108c2ca9b6b9/src/websockets/legacy/http.py#L14

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions