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

Cannot edit cookies. #449

Open
dElogics opened this issue Apr 2, 2024 · 3 comments
Open

Cannot edit cookies. #449

dElogics opened this issue Apr 2, 2024 · 3 comments

Comments

@dElogics
Copy link

dElogics commented Apr 2, 2024

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 dElogics changed the title Cannot set cookies. Cannot edit cookies. Apr 2, 2024
@taf2
Copy link
Owner

taf2 commented Sep 9, 2024

I think this PR will address this issue: #455

@uvlad7
Copy link
Contributor

uvlad7 commented Oct 2, 2024

@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.

@dElogics
Copy link
Author

@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?

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

No branches or pull requests

3 participants