{"id":4029,"date":"2012-07-08T14:48:04","date_gmt":"2012-07-08T12:48:04","guid":{"rendered":"http:\/\/daniel.haxx.se\/blog\/?p=4029"},"modified":"2012-07-08T14:48:04","modified_gmt":"2012-07-08T12:48:04","slug":"curls-new-http-cookies-docs","status":"publish","type":"post","link":"https:\/\/daniel.haxx.se\/blog\/2012\/07\/08\/curls-new-http-cookies-docs\/","title":{"rendered":"curl&#8217;s new HTTP cookies docs"},"content":{"rendered":"<p>Whenever libcurl saves cookies to a file, it saves them in the old &#8220;Netscape cookie format&#8221;.<img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-2324\" title=\"cookie\" src=\"http:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2010\/12\/cookie.png\" alt=\"cookie\" width=\"128\" height=\"128\" \/><\/p>\n<p>Since ages ago libcurl has written a comment at the top of that cookie file (the file we refer to as the cookie jar in curl lingo) that explains that it is a cookie netscape cookie file format and then a URL pointing to the <a href=\"http:\/\/curl.haxx.se\/rfc\/cookie_spec.html\">original Netscape document<\/a> describing what cookies are and how they work. To be perfectly honest, we pointed to a local copy of that document since the original is since long removed and gone and now only available through archive.org.<\/p>\n<p>The web page pointed to were never a perfect match since the page never explained the file format or its use, only the cookie protocol &#8211; as it was originally described to work and not even <a href=\"http:\/\/daniel.haxx.se\/blog\/2011\/04\/28\/the-cookie-rfc-6265\/\">like cookies works today<\/a>.<\/p>\n<p>Starting with <strong>curl 7.27.0<\/strong>, it will write the header to point to another URL: <a href=\"http:\/\/curl.haxx.se\/docs\/http-cookies.html\">http:\/\/curl.haxx.se\/docs\/http-cookies.html<\/a><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/curl.haxx.se\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-64   aligncenter\" title=\"cURL\" src=\"http:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2007\/09\/curl-keywords300.jpg\" alt=\"cURL\" width=\"300\" height=\"110\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whenever libcurl saves cookies to a file, it saves them in the old &#8220;Netscape cookie format&#8221;. Since ages ago libcurl has written a comment at the top of that cookie file (the file we refer to as the cookie jar in curl lingo) that explains that it is a cookie netscape cookie file format and &hellip; <a href=\"https:\/\/daniel.haxx.se\/blog\/2012\/07\/08\/curls-new-http-cookies-docs\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">curl&#8217;s new HTTP cookies docs<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[216,33],"class_list":["post-4029","post","type-post","status-publish","format-standard","hentry","category-curl","tag-cookies","tag-curl-and-libcurl"],"_links":{"self":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/4029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/comments?post=4029"}],"version-history":[{"count":10,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/4029\/revisions"}],"predecessor-version":[{"id":4039,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/4029\/revisions\/4039"}],"wp:attachment":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media?parent=4029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/categories?post=4029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/tags?post=4029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}