Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downcasing of header keys breaks bad servers #248

Closed
mvz opened this issue Jun 11, 2024 · 3 comments · Fixed by #249
Closed

Downcasing of header keys breaks bad servers #248

mvz opened this issue Jun 11, 2024 · 3 comments · Fixed by #249

Comments

@mvz
Copy link

mvz commented Jun 11, 2024

With httpi 4.0, httpi downcases sent headers because it uses a copy of Rack's Rack::Headers class. This class downcases headers and this works fine because Rack is meant for processing incoming HTTP requests. However, since httpi is used for sending requests, this behavior breaks use cases where HTTP requests need to be sent to misbehaving servers that require a particular casing.

Please consider replacing the HTTPI::Utils::Headers implementation with the implemenation of Rack::Utils::HeadersHash from Rack 2.2.9. This implementation is case preserving and does not downcase headers.

@pcai
Copy link
Member

pcai commented Jun 12, 2024

Thanks for reporting this. Yes the reasoning for this behavior makes sense - will look into reverting the change

@pcai
Copy link
Member

pcai commented Jun 13, 2024

released as v4.0.2

@mvz
Copy link
Author

mvz commented Jun 19, 2024

Thanks @pcai, it works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants