curb icon indicating copy to clipboard operation
curb copied to clipboard

Cannot edit cookies.

Open dElogics opened this issue 1 year ago • 3 comments

After enabling enable_cookies, trying to edit an existing (automatically set) cookie does not work. cookie= has no affect; it does not alter the stored cookie.

Tried with curb 1.0.5 on Ruby 3.1

dElogics avatar Apr 02 '24 09:04 dElogics

I think this PR will address this issue: https://github.com/taf2/curb/pull/455

taf2 avatar Sep 09 '24 20:09 taf2

@dElogics you should understand the difference between custom cookies ('CURLOPT_COOKIE') and cookies in the internal engine (CURLOPT_COOKIELIST). The first ones are what cookies= sets and cookies returns. The last ones are where cookies from Set-Cookie go, what cookielist returns and what #455 is gonna let manipulate.

See this.

Also note that cookies = nil has no effect in curb, use cookies = ''; nil also doesn't work well with cookiefile and cookiejar, maybe it should be fixed.

uvlad7 avatar Oct 02 '24 15:10 uvlad7

@dElogics you should understand the difference between custom cookies ('CURLOPT_COOKIE') and cookies in the internal engine (CURLOPT_COOKIELIST). The first ones are what cookies= sets and cookies returns. The last ones are where cookies from Set-Cookie go, what cookielist returns and what #455 is gonna let manipulate.

See this.

Also note that cookies = nil has no effect in curb, use cookies = ''; nil also doesn't work well with cookiefile and cookiejar, maybe it should be fixed.

Thanks for clarifying. I tried it out. Maybe the documentation must be updated?

dElogics avatar Oct 19 '24 07:10 dElogics