From 27f3839de17d621b5d9e7c62900fe873ddb02227 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 712cdc554..2485dc493 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.scheme and request_url.netloc: environ['HTTP_HOST'] = request_url.netloc return environ