From 413a978fa99f64d2abdfb8bddd1da5bf44bc52ec Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sun, 10 Apr 2016 23:52:36 +0200 Subject: [PATCH] serving: absolute request URLs need a scheme Fix #822 --- werkzeug/serving.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/werkzeug/serving.py b/werkzeug/serving.py index eafb1cde3..d6abbc31d 100644 --- a/werkzeug/serving.py +++ b/werkzeug/serving.py @@ -125,7 +125,7 @@ def shutdown_server(): if key not in ('HTTP_CONTENT_TYPE', 'HTTP_CONTENT_LENGTH'): environ[key] = value - if request_url.netloc: + if request_url.scheme and request_url.netloc: environ['HTTP_HOST'] = request_url.netloc return environ