{"action":"created","issue":{"url":"https://api.github.com/repos/bagder/curl/issues/195","labels_url":"https://api.github.com/repos/bagder/curl/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/bagder/curl/issues/195/comments","events_url":"https://api.github.com/repos/bagder/curl/issues/195/events","html_url":"https://github.com/bagder/curl/issues/195","id":65719610,"number":195,"title":"Curl cookie handling bug with spaces","user":{"login":"cromestant","id":56137,"avatar_url":"https://avatars.githubusercontent.com/u/56137?v=3","gravatar_id":"","url":"https://api.github.com/users/cromestant","html_url":"https://github.com/cromestant","followers_url":"https://api.github.com/users/cromestant/followers","following_url":"https://api.github.com/users/cromestant/following{/other_user}","gists_url":"https://api.github.com/users/cromestant/gists{/gist_id}","starred_url":"https://api.github.com/users/cromestant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cromestant/subscriptions","organizations_url":"https://api.github.com/users/cromestant/orgs","repos_url":"https://api.github.com/users/cromestant/repos","events_url":"https://api.github.com/users/cromestant/events{/privacy}","received_events_url":"https://api.github.com/users/cromestant/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bagder/curl/labels/HTTP","name":"HTTP","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"bagder","id":177011,"avatar_url":"https://avatars.githubusercontent.com/u/177011?v=3","gravatar_id":"","url":"https://api.github.com/users/bagder","html_url":"https://github.com/bagder","followers_url":"https://api.github.com/users/bagder/followers","following_url":"https://api.github.com/users/bagder/following{/other_user}","gists_url":"https://api.github.com/users/bagder/gists{/gist_id}","starred_url":"https://api.github.com/users/bagder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagder/subscriptions","organizations_url":"https://api.github.com/users/bagder/orgs","repos_url":"https://api.github.com/users/bagder/repos","events_url":"https://api.github.com/users/bagder/events{/privacy}","received_events_url":"https://api.github.com/users/bagder/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-04-01T16:06:25Z","updated_at":"2015-04-01T20:43:08Z","closed_at":null,"body":"Hello, \r\nI just ran into a wonky behavior in curl 's cookie handling when spaces exist in the cookie:\r\nhere is a gist with the trace:https://gist.github.com/cromestant/9452ad9912c27882867c\r\n\r\nto reproduce I created two PHP files \r\n\r\n//cookie.php\r\n```php\r\n<?php\r\nheader(\"Set-Cookie: CHARZID=this is ma cookie; path=/\");\r\nheader(\"Location: http://www.google.com\");\r\n```\r\nand \r\n//cookies2.php\r\n```php\r\n<?php\r\nheader(\"Set-Cookie: CHARZID = this is ma cookie; path=/\");\r\nheader(\"Location: http://www.google.com\");\r\n```\r\nthe only difference is the space in the cookie name=value .\r\nI looked at the RFC and it seems like a valid cookie header.\r\n\r\nIf you curl it and use a cookie jar you will see that cookie 2 does not set the value\r\nyou can test here:\r\nhttp://test dot tigocloud dot net slash cookie.php \r\nand cookie2.php\r\n"},"comment":{"url":"https://api.github.com/repos/bagder/curl/issues/comments/88626022","html_url":"https://github.com/bagder/curl/issues/195#issuecomment-88626022","issue_url":"https://api.github.com/repos/bagder/curl/issues/195","id":88626022,"user":{"login":"bagder","id":177011,"avatar_url":"https://avatars.githubusercontent.com/u/177011?v=3","gravatar_id":"","url":"https://api.github.com/users/bagder","html_url":"https://github.com/bagder","followers_url":"https://api.github.com/users/bagder/followers","following_url":"https://api.github.com/users/bagder/following{/other_user}","gists_url":"https://api.github.com/users/bagder/gists{/gist_id}","starred_url":"https://api.github.com/users/bagder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagder/subscriptions","organizations_url":"https://api.github.com/users/bagder/orgs","repos_url":"https://api.github.com/users/bagder/repos","events_url":"https://api.github.com/users/bagder/events{/privacy}","received_events_url":"https://api.github.com/users/bagder/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T20:43:07Z","updated_at":"2015-04-01T20:43:07Z","body":"Thanks, I'll write up a test case (or perhaps amend an existing) for this to first repeat it and then make sure it verifies the fix - while not breaking any existing test!"}}