Skip to content

Conversation

AjitR
Copy link

@AjitR AjitR commented Sep 25, 2025

Add ability to configure maximum URI length through HYPER_MAX_URI_LEN environment variable while maintaining the default value when the variable is not set.

  • Maintains backward compatibility by keeping same default value
  • Only uses environment variable when explicitly set
  • Falls back to default value for invalid configurations

Motivation

We have some legacy applications which supports pretty big URI. We are adding a new component built in rust (using hyper) which will handle this communication in future. Requests get rejected with if they are above 64K hardcoded limit in the hyper crate. So making it configurable via ENV variable.

2025-09-23T18:42:59.858177Z DEBUG hyper::proto::h1::conn: parse error (URI too long) with 65646 bytes

2025-09-23T18:42:59.858235Z DEBUG hyper::proto::h1::role: sending automatic response (414 URI Too Long) for parse error

2025-09-23T18:42:59.858327Z DEBUG hyper::proto::h1::io: flushed 85 bytes

2025-09-23T18:42:59.858404Z DEBUG hyper::server::server::new_svc: connection error: URI too long

#3960

Add ability to configure maximum URI length through HYPER_MAX_URI_LEN
environment variable while maintaining the default value when
the variable is not set.

- Maintains backward compatibility by keeping same default value
- Only uses environment variable when explicitly set
- Falls back to default value for invalid configurations
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.

1 participant