We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've encountered an issue with the case-insensitive Hash which is used as a response headers container. While the case insensitivity works as expected when accessing headers using #[], it fails when using the #dig method. Rack handles this properly: https://github.com/rack/rack/blob/8c73aefcc7085c71bdfe6c1ec867f126ede34124/lib/rack/headers.rb#L131-L133
#[]
#dig
require 'faraday' response = Faraday.get('http://httpbingo.org') pp response.headers.dig('via') # "1.1 fly.io" pp response.headers.dig('Via') # nil
The text was updated successfully, but these errors were encountered:
Cool find, would you like to try making a PR?
Can it be done without changing all adapters? Probably!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Basic Info
Issue description
I've encountered an issue with the case-insensitive Hash which is used as a response headers container. While the case insensitivity works as expected when accessing headers using
#[]
, it fails when using the#dig
method. Rack handles this properly: https://github.com/rack/rack/blob/8c73aefcc7085c71bdfe6c1ec867f126ede34124/lib/rack/headers.rb#L131-L133Steps to reproduce
The text was updated successfully, but these errors were encountered: