Open pinpox opened 9 years ago
Hi,
I'm running into the same warning. Unfortunately for me httpclient is setting and getting the cookies using a cookie store and I cannot simply call Cookie#dot_domain as suggested:
cookie_file = Tempfile.new('cookie_jar.txt')
clnt = HTTPClient.new
clnt.set_cookie_store(cookie_file)
clnt.get(URL1)
clnt.post(URL2) # cookie use throws warning 'Cookie#domain returns dot-less domain name now. Use Cookie#dot_domain if you need "." at the beginning.'
I would say it's preferrable to set a flag in the library to allow the client to use Cookie#dot_domain under the hood:
client.allow_dot_domain_cookie = true
Bob
I have similar problem. I need to allow dot_domain but I don't know how.
:-1: this is annoying.
Using a Faraday::Adapter::HttpClient that does nothing to configure cookie management in httpclient, i.e. https://github.com/lostisland/faraday/blob/master/lib/faraday/adapter/httpclient.rb
So this warning is a message for httpclient by httpclient? Why not just fix it in httpclient? The culprit line is at https://github.com/nahi/httpclient/blob/master/lib/httpclient/cookie.rb#L197
Please wrap it to use @@warned
so it can be toggled off, see
Okay, what confuses me about this is I used to get it when testing/using my MediaWiki::Butt gem, but it stopped so long ago and I don't remember how I may have "fixed" it. And even still, it happens for another user using basically identical code to mine.
O totally agree, is there any way to remove this annoying warning?
class WebAgent
class Cookie < HTTP::Cookie
def domain
self.original_domain
end
end
end
^ is how I removed the warning. It'd be nice if there was an option to ignore the warning.
Hello,
Im getting this warning over and over again:
I'm looking for a way to fix it, but cant find anything. How do I upgrade or disable thje warnings?
Cheers, binaryplease