{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/3193","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/3193/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/3193/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/3193/events","html_url":"https://github.com/phalcon/cphalcon/issues/3193","id":53742911,"number":3193,"title":"Double send headers and cookies","user":{"login":"oleg578","id":2156733,"avatar_url":"https://avatars.githubusercontent.com/u/2156733?v=3","gravatar_id":"","url":"https://api.github.com/users/oleg578","html_url":"https://github.com/oleg578","followers_url":"https://api.github.com/users/oleg578/followers","following_url":"https://api.github.com/users/oleg578/following{/other_user}","gists_url":"https://api.github.com/users/oleg578/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg578/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg578/subscriptions","organizations_url":"https://api.github.com/users/oleg578/orgs","repos_url":"https://api.github.com/users/oleg578/repos","events_url":"https://api.github.com/users/oleg578/events{/privacy}","received_events_url":"https://api.github.com/users/oleg578/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-08T11:55:40Z","updated_at":"2015-01-09T00:09:05Z","closed_at":null,"body":"Method Phalcon\\Mvc\\Application handle send headers and cookies\r\nhttps://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/mvc/application.zep#L453\r\nand return Phalcon\\HTTP\\Response\r\nAfter that when we send send Response, headers and cookies are send again...\r\nhttps://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/http/response.zep#L595\r\n\r\nIf I wrote in application normal code\r\n```php\r\n$application->main()->handle()->send();\r\n```\r\nI get double headers and cookies\r\n\r\n```\r\ncurl -i http://localhost:8000/admin\r\nHTTP/1.1 200 OK\r\nHost: localhost:8000\r\nConnection: close\r\nX-Powered-By: PHP/5.6.4\r\nSet-Cookie: PHPSESSID=8avt3lufu8rc2e72ne5stvjdmvdtta1k; path=/\r\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\r\nCache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\r\nPragma: no-cache\r\nSet-Cookie: __urs=pg%2BgYpjdpSZlQBgVazybtIzGtYWyX2MGTXLcL88%2BLENfRCUBwBW%2Buk0%3D; path=/; httponly\r\nSet-Cookie: __urs=EHKDQ8t0oWjawsKzXYGbSBVfq2DS46lMMUroKvt2TcyXIGKKHNkPQUM%3D; path=/; httponly\r\nContent-type: text/html; charset=UTF-8\r\n```\r\nI found this in \r\nPhalcon 1.3.4 and 2.0.0"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/69273564","html_url":"https://github.com/phalcon/cphalcon/issues/3193#issuecomment-69273564","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/3193","id":69273564,"user":{"login":"oleg578","id":2156733,"avatar_url":"https://avatars.githubusercontent.com/u/2156733?v=3","gravatar_id":"","url":"https://api.github.com/users/oleg578","html_url":"https://github.com/oleg578","followers_url":"https://api.github.com/users/oleg578/followers","following_url":"https://api.github.com/users/oleg578/following{/other_user}","gists_url":"https://api.github.com/users/oleg578/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg578/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg578/subscriptions","organizations_url":"https://api.github.com/users/oleg578/orgs","repos_url":"https://api.github.com/users/oleg578/repos","events_url":"https://api.github.com/users/oleg578/events{/privacy}","received_events_url":"https://api.github.com/users/oleg578/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T00:09:05Z","updated_at":"2015-01-09T00:09:05Z","body":"See, please, links to source in my first post.\r\nHeaders and cookies are sending in Application->handle and in Response->send.\r\nI loss 2 work day out of  this behavior"}}