From dd5c9a5d412321bed8e2620a148a1b6fc43fc734 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 5 Apr 2020 17:26:48 -0700 Subject: Fix parameters being ignored in youtu.be links The parameters weren't passed to the underlying function --- server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server.py') diff --git a/server.py b/server.py index 5a68928..ae4dcda 100644 --- a/server.py +++ b/server.py @@ -24,7 +24,10 @@ import re def youtu_be(env, start_response): id = env['PATH_INFO'][1:] env['PATH_INFO'] = '/watch' - env['QUERY_STRING'] = 'v=' + id + if not env['QUERY_STRING']: + env['QUERY_STRING'] = 'v=' + id + else: + env['QUERY_STRING'] += '&v=' + id yield from yt_app(env, start_response) def proxy_site(env, start_response): -- cgit v1.2.3