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

Fix ArgumentError. #37

Closed
wants to merge 1 commit into from
Closed

Fix ArgumentError. #37

wants to merge 1 commit into from

Conversation

vakuum
Copy link

@vakuum vakuum commented Sep 29, 2021

The following line in lib/http/cookie_jar/abstract_store.rb cause an ArgumentError:

raise IndexError, 'cookie store unavailable: %s, error: %s' % symbol.inspect, e.message

The parameters of the % operator must be passed as an array:

raise IndexError, 'cookie store unavailable: %s, error: %s' % [symbol.inspect, e.message]

Without this change:

> HTTP::Cookie::VERSION
 => "1.0.4" 

> HTTP::CookieJar.new(store: :unknown)
...
ArgumentError (too few arguments)

With this change:

> HTTP::Cookie::VERSION
 => "1.0.4" 

> HTTP::CookieJar.new(store: :unknown)
...
ArgumentError (cookie store unavailable: :unknown, error: cannot load such file -- http/cookie_jar/unknown_store)

@julien-pinchelimouroux
Copy link

julien-pinchelimouroux commented Oct 26, 2023

Why is this PR not already merged ?
We have the same issue in production based on RestClient http-cookie usage.

image

This is also fixed by #43

@flavorjones
Copy link
Member

This was fixed in 44374a7

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.

3 participants