Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use lowercase response headers in Rack example#268

Merged
Sinjo merged 1 commit intomainfrom
sinjo-lowercase-example-headers
Nov 25, 2022
Merged

Use lowercase response headers in Rack example#268
Sinjo merged 1 commit intomainfrom
sinjo-lowercase-example-headers

Conversation

Copy link
Member

Sinjo commented Nov 24, 2022

Because HTTP/2 requires that headers are sent in lowercase, Rack has started validating that no header contains an uppercase letter.

We were setting uppercase headers as that was a common convention in HTTP/1.1, where they were interpreted in a case-insensitive fashion.

This change makes us compatible with Rack 3.0 without breaking compatibiility for older versions (not that it would matter for this example code).


Fixes #267

Sinjo requested a review from dmagliola November 24, 2022 00:43
Because HTTP/2 requires that headers are sent in lowercase, Rack has
started validating that no header contains an uppercase letter.

We were setting uppercase headers as that was a common convention in
HTTP/1.1, where they were interpreted in a case-insensitive fashion.

This change makes us compatible with Rack 3.0 without breaking
compatibiility for older versions (not that it would matter for this
example code).

Signed-off-by: Chris Sinjakli
Sinjo force-pushed the sinjo-lowercase-example-headers branch from 59b20c9 to c78dbb0 Compare November 24, 2022 00:44
Copy link
Member Author

Sinjo commented Nov 24, 2022

I think this might come and hit us in our exporter middleware too, but I need to test the compatibility implications of changing that.

I'd be shocked if Prometheus weren't treating them in a case-insensitive way, but I'll give it a try before I PR a change in for those.

dmagliola approved these changes Nov 24, 2022
Sinjo merged commit 5a04516 into main Nov 25, 2022
Sinjo deleted the sinjo-lowercase-example-headers branch November 25, 2022 17:41
Sinjo mentioned this pull request Dec 20, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

dmagliola dmagliola approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

The rack example does not work because of Rack::Lint::LintError

2 participants