{"action":"opened","issue":{"url":"https://api.github.com/repos/slimphp/Slim/issues/1392","labels_url":"https://api.github.com/repos/slimphp/Slim/issues/1392/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/1392/comments","events_url":"https://api.github.com/repos/slimphp/Slim/issues/1392/events","html_url":"https://github.com/slimphp/Slim/issues/1392","id":97858764,"number":1392,"title":"Returning PSR7 responses from external services","user":{"login":"AlexStansfield","id":4319443,"avatar_url":"https://avatars.githubusercontent.com/u/4319443?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexStansfield","html_url":"https://github.com/AlexStansfield","followers_url":"https://api.github.com/users/AlexStansfield/followers","following_url":"https://api.github.com/users/AlexStansfield/following{/other_user}","gists_url":"https://api.github.com/users/AlexStansfield/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexStansfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexStansfield/subscriptions","organizations_url":"https://api.github.com/users/AlexStansfield/orgs","repos_url":"https://api.github.com/users/AlexStansfield/repos","events_url":"https://api.github.com/users/AlexStansfield/events{/privacy}","received_events_url":"https://api.github.com/users/AlexStansfield/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-29T04:47:24Z","updated_at":"2015-07-29T04:47:24Z","closed_at":null,"body":"Came across an interesting one.\r\n\r\nThe project I'm working on is a sort of api facade providing a public layer between client applications and our internal web services.\r\n\r\nOne of the things I liked about the Slim 3 / Guzzle 6 combination was they both use PSR7 responses.\r\n\r\nSo with this in mind once the response from guzzle has had the body manipulated depending on the internal service in question I was just returning it for Slim 3 to handle.\r\n\r\nI found I was getting errors back from Apache which I tracked down to the Transfer-Encoding header in the original response given by guzzle.\r\n\r\nI've fixed this in the project by having the app middleware strip that header from the response.\r\n\r\nI was wondering if this was a feature that might be useful to have done automatically (and if so what other headers we should be stripping). To me it seems like a nice advantage of PSR7 that we can just pass back responses no matter where they originate without the developer having to modify them."}}