-c or --cookie-jar doesn't accept some cookie names #2564

Closed
anshnd opened this Issue May 12, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@anshnd

anshnd commented May 12, 2018

I did this

curl -v --cookie-jar cookies.txt https://httpbin.org/cookies/set?domain=value

I expected the following

cookies.txt to be created and contain
httpbin.org FALSE / TRUE 0 domain value

Instead I got

* skipped cookie with bad tailmatch domain: value
and no cookies.txt file. It seems curl is wrongly applying attribute semantics to the cookie's name. Note that https://tools.ietf.org/html/rfc6265#section-4.2.1 sets no restrictions on cookie-name

curl/libcurl version

libcurl/7.53.1

[curl -V output]
curl 7.53.1 (x86_64-redhat-linux-gnu) libcurl/7.53.1 NSS/3.35 zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.3) libssh2/1.8.0 nghttp2/1.21.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy Metalink PSL

operating system

tested on Mac and Linux

@anshnd anshnd changed the title from --cookiejar doesn't accept some cookie names to -c or --cookie-jar doesn't accept some cookie names May 12, 2018

@monnerat

This comment has been minimized.

Show comment Hide comment
@monnerat

monnerat May 12, 2018

Collaborator

Thanks for your report: the problem is confirmed.
I'm currently working for a fix: will be available soon in master.

Collaborator

monnerat commented May 12, 2018

Thanks for your report: the problem is confirmed.
I'm currently working for a fix: will be available soon in master.

@monnerat monnerat closed this in 1b55d27 May 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment