{"action":"created","issue":{"url":"https://api.github.com/repos/nette/http/issues/50","labels_url":"https://api.github.com/repos/nette/http/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/nette/http/issues/50/comments","events_url":"https://api.github.com/repos/nette/http/issues/50/events","html_url":"https://github.com/nette/http/pull/50","id":57205021,"number":50,"title":"Session: fetch session cookie from Http\\IRequest","user":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-02-10T17:14:19Z","updated_at":"2015-02-11T00:00:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nette/http/pulls/50","html_url":"https://github.com/nette/http/pull/50","diff_url":"https://github.com/nette/http/pull/50.diff","patch_url":"https://github.com/nette/http/pull/50.patch"},"body":"The `nette-browser` is also fetched from `Http\\IRequest`, so the `session_name()` should probably be too.\r\n\r\nFor example I might be writing my own little http server using [react.php](https://github.com/reactphp/http) that accepts requests and processes them through sockets and is started from CLI. This would mean that I have to initialize the `$_COOKIES` variable instead of passing it in a nice OO interface through manually created `Http\\Request`.\r\n\r\nThe fetching of the cookie alone would help a lot. The setting of the cookie to the global variable is a paranoid safety-net, for cases where something depends on the variable existing other than `Nette\\Http\\Session`. If you have a problem with modifying the global variable, I can remove it. But I'd rather keep it there."},"comment":{"url":"https://api.github.com/repos/nette/http/issues/comments/73810795","html_url":"https://github.com/nette/http/pull/50#issuecomment-73810795","issue_url":"https://api.github.com/repos/nette/http/issues/50","id":73810795,"user":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T00:00:03Z","updated_at":"2015-02-11T00:00:03Z","body":"It cannot, \r\n\r\n> session_id() is not affected by $_COOKIE"}}