{"action":"created","issue":{"url":"https://api.github.com/repos/guits/pastefile/issues/8","labels_url":"https://api.github.com/repos/guits/pastefile/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/guits/pastefile/issues/8/comments","events_url":"https://api.github.com/repos/guits/pastefile/issues/8/events","html_url":"https://github.com/guits/pastefile/issues/8","id":114691135,"number":8,"title":"Favicon stack trace","user":{"login":"gaelL","id":2479183,"avatar_url":"https://avatars.githubusercontent.com/u/2479183?v=3","gravatar_id":"","url":"https://api.github.com/users/gaelL","html_url":"https://github.com/gaelL","followers_url":"https://api.github.com/users/gaelL/followers","following_url":"https://api.github.com/users/gaelL/following{/other_user}","gists_url":"https://api.github.com/users/gaelL/gists{/gist_id}","starred_url":"https://api.github.com/users/gaelL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaelL/subscriptions","organizations_url":"https://api.github.com/users/gaelL/orgs","repos_url":"https://api.github.com/users/gaelL/repos","events_url":"https://api.github.com/users/gaelL/events{/privacy}","received_events_url":"https://api.github.com/users/gaelL/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-02T21:46:13Z","updated_at":"2015-11-06T07:15:27Z","closed_at":"2015-11-06T07:15:27Z","body":"When you are using explorer like chrome, chrome automatically try to get favicon.ico.\r\n```\r\n127.0.0.1 - - [02/Nov/2015 22:43:28] \"GET /favicon.ico HTTP/1.1\" 500 -\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/flask/app.py\", line 1836, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/usr/local/lib/python2.7/dist-packages/flask/app.py\", line 1820, in wsgi_app\r\n    response = self.make_response(self.handle_exception(e))\r\n  File \"/usr/local/lib/python2.7/dist-packages/flask/app.py\", line 1403, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/usr/local/lib/python2.7/dist-packages/flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/usr/local/lib/python2.7/dist-packages/flask/app.py\", line 1478, in full_dispatch_request\r\n    response = self.make_response(rv)\r\n  File \"/usr/local/lib/python2.7/dist-packages/flask/app.py\", line 1566, in make_response\r\n    raise ValueError('View function did not return a response')\r\nValueError: View function did not return a response\r\n```"},"comment":{"url":"https://api.github.com/repos/guits/pastefile/issues/comments/154331999","html_url":"https://github.com/guits/pastefile/issues/8#issuecomment-154331999","issue_url":"https://api.github.com/repos/guits/pastefile/issues/8","id":154331999,"user":{"login":"guits","id":3717838,"avatar_url":"https://avatars.githubusercontent.com/u/3717838?v=3","gravatar_id":"","url":"https://api.github.com/users/guits","html_url":"https://github.com/guits","followers_url":"https://api.github.com/users/guits/followers","following_url":"https://api.github.com/users/guits/following{/other_user}","gists_url":"https://api.github.com/users/guits/gists{/gist_id}","starred_url":"https://api.github.com/users/guits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guits/subscriptions","organizations_url":"https://api.github.com/users/guits/orgs","repos_url":"https://api.github.com/users/guits/repos","events_url":"https://api.github.com/users/guits/events{/privacy}","received_events_url":"https://api.github.com/users/guits/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T07:15:27Z","updated_at":"2015-11-06T07:15:27Z","body":"fixed in b522173\r\n```\r\n @app.route('/<id_file>', methods=['GET'])\r\n def get_file(id_file):\r\n     with JsonDB(app.config['file_list']) as db:\r\n-        filename = db.db[id_file]['storage_full_filename']\r\n-        print filename\r\n-        return send_from_directory(app.config['upload_folder'],\r\n-                                   os.path.basename(filename))\r\n+        if id_file in db.db:\r\n+            filename = db.db[id_file]['storage_full_filename']\r\n+            return send_from_directory(app.config['upload_folder'],\r\n+                                       os.path.basename(filename))\r\n+        else:\r\n+            return abort(404)```"}}