diff --git a/initialize_db.sql b/initialize_db.sql index 0a4ff9f..cf63167 100644 --- a/initialize_db.sql +++ b/initialize_db.sql @@ -1,7 +1,5 @@ CREATE TABLE version ( version INTEGER ); -INSERT INTO version VALUES (2); - /* column names must match protobuf field names */ CREATE TABLE activity ( diff --git a/standalone.py b/standalone.py index 12cc184..3c44c95 100755 --- a/standalone.py +++ b/standalone.py @@ -183,7 +183,9 @@ class CDNHandler(SimpleHTTPRequestHandler): # We have no identifying information when Zwift makes MapSchedule request except for the client's IP. MAP_OVERRIDE.append((self.client_address[0], path_end)) self.send_response(302) - self.send_header('Cookie', self.headers.get('Cookie') + "; map=%s" % path_end) + cookie = self.headers.get('Cookie') + if cookie: + self.send_header('Cookie', cookie + "; map=%s" % path_end) self.send_header('Location', 'https://secure.zwift.com/ride') self.end_headers() return