diff --git a/onionshare/web/receive_mode.py b/onionshare/web/receive_mode.py index 5029232f..8604a889 100644 --- a/onionshare/web/receive_mode.py +++ b/onionshare/web/receive_mode.py @@ -21,6 +21,8 @@ class ReceiveModeWeb: self.can_upload = True self.uploads_in_progress = [] + self.cur_history_id = 0 + self.define_routes() def define_routes(self): @@ -29,6 +31,13 @@ class ReceiveModeWeb: """ @self.web.app.route("/") def index(): + history_id = self.cur_history_id + self.cur_history_id += 1 + self.web.add_request(self.web.REQUEST_INDIVIDUAL_FILE_STARTED, '{}'.format(request.path), { + 'id': history_id, + 'status_code': 200 + }) + self.web.add_request(self.web.REQUEST_LOAD, request.path) r = make_response(render_template('receive.html', static_url_path=self.web.static_url_path)) diff --git a/onionshare/web/web.py b/onionshare/web/web.py index 610c14c2..6cd30c93 100644 --- a/onionshare/web/web.py +++ b/onionshare/web/web.py @@ -209,7 +209,6 @@ class Web: self.cur_history_id += 1 self.add_request(self.REQUEST_INDIVIDUAL_FILE_STARTED, '{}'.format(request.path), { 'id': history_id, - 'method': request.method, 'status_code': 404 })