From 3fcfe45e846300d36cc5b419ac6448bd7092feb8 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 2 Jan 2018 13:29:03 -0800 Subject: [PATCH] Add missing proto header argument to HTTPFactory --- daphne/http_protocol.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index df9f93a..41e8552 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -312,7 +312,7 @@ class HTTPFactory(http.HTTPFactory): routed appropriately. """ - def __init__(self, channel_layer, action_logger=None, send_channel=None, timeout=120, websocket_timeout=86400, ping_interval=20, ping_timeout=30, ws_protocols=None, root_path="", websocket_connect_timeout=30, proxy_forwarded_address_header=None, proxy_forwarded_port_header=None, websocket_handshake_timeout=5): + def __init__(self, channel_layer, action_logger=None, send_channel=None, timeout=120, websocket_timeout=86400, ping_interval=20, ping_timeout=30, ws_protocols=None, root_path="", websocket_connect_timeout=30, proxy_forwarded_address_header=None, proxy_forwarded_port_header=None, proxy_forwarded_proto_header=None, websocket_handshake_timeout=5): http.HTTPFactory.__init__(self) self.channel_layer = channel_layer self.action_logger = action_logger @@ -324,6 +324,7 @@ class HTTPFactory(http.HTTPFactory): self.ping_interval = ping_interval self.proxy_forwarded_address_header = proxy_forwarded_address_header self.proxy_forwarded_port_header = proxy_forwarded_port_header + self.proxy_forwarded_proto_header = proxy_forwarded_proto_header # We track all sub-protocols for response channel mapping self.reply_protocols = {} # Make a factory for WebSocket protocols