{"action":"created","issue":{"url":"https://api.github.com/repos/slimphp/Slim/issues/1681","labels_url":"https://api.github.com/repos/slimphp/Slim/issues/1681/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/1681/comments","events_url":"https://api.github.com/repos/slimphp/Slim/issues/1681/events","html_url":"https://github.com/slimphp/Slim/issues/1681","id":122516584,"number":1681,"title":"Slim3 Body opens a tempfile for each request","user":{"login":"mbretter","id":1787808,"avatar_url":"https://avatars.githubusercontent.com/u/1787808?v=3","gravatar_id":"","url":"https://api.github.com/users/mbretter","html_url":"https://github.com/mbretter","followers_url":"https://api.github.com/users/mbretter/followers","following_url":"https://api.github.com/users/mbretter/following{/other_user}","gists_url":"https://api.github.com/users/mbretter/gists{/gist_id}","starred_url":"https://api.github.com/users/mbretter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbretter/subscriptions","organizations_url":"https://api.github.com/users/mbretter/orgs","repos_url":"https://api.github.com/users/mbretter/repos","events_url":"https://api.github.com/users/mbretter/events{/privacy}","received_events_url":"https://api.github.com/users/mbretter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-16T14:34:09Z","updated_at":"2015-12-16T14:38:48Z","closed_at":null,"body":"I've found that the response object creates the body by default from a tempfile, this means that for each request a tmpfile is created causing i/o.\r\n\r\nwouldn't it be better to use:\r\n```\r\n$this->body = $body ? $body : new Body(fopen('php://memory', 'r+'));\r\n```\r\nby default instead?"},"comment":{"url":"https://api.github.com/repos/slimphp/Slim/issues/comments/165128217","html_url":"https://github.com/slimphp/Slim/issues/1681#issuecomment-165128217","issue_url":"https://api.github.com/repos/slimphp/Slim/issues/1681","id":165128217,"user":{"login":"geggleto","id":4027602,"avatar_url":"https://avatars.githubusercontent.com/u/4027602?v=3","gravatar_id":"","url":"https://api.github.com/users/geggleto","html_url":"https://github.com/geggleto","followers_url":"https://api.github.com/users/geggleto/followers","following_url":"https://api.github.com/users/geggleto/following{/other_user}","gists_url":"https://api.github.com/users/geggleto/gists{/gist_id}","starred_url":"https://api.github.com/users/geggleto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geggleto/subscriptions","organizations_url":"https://api.github.com/users/geggleto/orgs","repos_url":"https://api.github.com/users/geggleto/repos","events_url":"https://api.github.com/users/geggleto/events{/privacy}","received_events_url":"https://api.github.com/users/geggleto/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T14:38:48Z","updated_at":"2015-12-16T14:38:48Z","body":"https://github.com/slimphp/Slim/blob/3.x/Slim/Http/Response.php#L126 offending line "}}