{"action":"created","issue":{"url":"https://api.github.com/repos/php-middleware/phpdebugbar/issues/8","repository_url":"https://api.github.com/repos/php-middleware/phpdebugbar","labels_url":"https://api.github.com/repos/php-middleware/phpdebugbar/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/php-middleware/phpdebugbar/issues/8/comments","events_url":"https://api.github.com/repos/php-middleware/phpdebugbar/issues/8/events","html_url":"https://github.com/php-middleware/phpdebugbar/pull/8","id":156385311,"number":8,"title":"Handle redirections before creating HTML response","user":{"login":"edigu","id":435857,"avatar_url":"https://avatars0.githubusercontent.com/u/435857?v=4","gravatar_id":"","url":"https://api.github.com/users/edigu","html_url":"https://github.com/edigu","followers_url":"https://api.github.com/users/edigu/followers","following_url":"https://api.github.com/users/edigu/following{/other_user}","gists_url":"https://api.github.com/users/edigu/gists{/gist_id}","starred_url":"https://api.github.com/users/edigu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edigu/subscriptions","organizations_url":"https://api.github.com/users/edigu/orgs","repos_url":"https://api.github.com/users/edigu/repos","events_url":"https://api.github.com/users/edigu/events{/privacy}","received_events_url":"https://api.github.com/users/edigu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-05-23T23:00:16Z","updated_at":"2018-04-17T22:00:34Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/php-middleware/phpdebugbar/pulls/8","html_url":"https://github.com/php-middleware/phpdebugbar/pull/8","diff_url":"https://github.com/php-middleware/phpdebugbar/pull/8.diff","patch_url":"https://github.com/php-middleware/phpdebugbar/pull/8.patch"},"body":"I'm trying-out the phpdebugbar for a several days, it does the job nearly perfect. Thank you for your effort. \n\nThis PR aims to fix a silly behaviour which occurs when `$outReponse` is a `Zend\\Diactoros\\Response\\RedirectResponse` instance.\n\nI have a zend-expressive application which redirects users to another locations after login/logout like specific actions by returning a `RedirectResponse` instance to outer middleware. The problem is debugbar checks html content-type header to decide the response has HTML or not:\n\n```\nif ($this->isHtmlResponse($outResponse)) { ...\n```\n\nWhen the response doesn't have that header (like `RedirectResponse` case) debugbar creates a new `HtmlResponse()` and returns it which completely breaks my app's redirect flow.\n\nP.s. My IDE applied some common coding standards via php-cs-fixer after save the file automatically. I can rollback them if you don't like.\n"},"comment":{"url":"https://api.github.com/repos/php-middleware/phpdebugbar/issues/comments/382168482","html_url":"https://github.com/php-middleware/phpdebugbar/pull/8#issuecomment-382168482","issue_url":"https://api.github.com/repos/php-middleware/phpdebugbar/issues/8","id":382168482,"user":{"login":"snapshotpl","id":312655,"avatar_url":"https://avatars3.githubusercontent.com/u/312655?v=4","gravatar_id":"","url":"https://api.github.com/users/snapshotpl","html_url":"https://github.com/snapshotpl","followers_url":"https://api.github.com/users/snapshotpl/followers","following_url":"https://api.github.com/users/snapshotpl/following{/other_user}","gists_url":"https://api.github.com/users/snapshotpl/gists{/gist_id}","starred_url":"https://api.github.com/users/snapshotpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapshotpl/subscriptions","organizations_url":"https://api.github.com/users/snapshotpl/orgs","repos_url":"https://api.github.com/users/snapshotpl/repos","events_url":"https://api.github.com/users/snapshotpl/events{/privacy}","received_events_url":"https://api.github.com/users/snapshotpl/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T22:00:34Z","updated_at":"2018-04-17T22:00:34Z","author_association":"OWNER","body":"@edigu @glen-84 @Erythros  can you take a look at #21 ?"}}
{"actor":{"display_login":"snapshotpl"}}