diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-08 17:36:46 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-09 16:08:35 +0100 |
commit | 2134b5b06abf354a595076da5ff2d43e455e1e90 (patch) | |
tree | 4627919668447ef264bb678be6004e60b6bce03d | |
parent | b5f0342664b04db9bf43513c3f7470e42e4b931f (diff) | |
download | mitmproxy-2134b5b06abf354a595076da5ff2d43e455e1e90.tar.gz mitmproxy-2134b5b06abf354a595076da5ff2d43e455e1e90.tar.bz2 mitmproxy-2134b5b06abf354a595076da5ff2d43e455e1e90.zip |
remove FIXME
-rw-r--r-- | mitmproxy/net/http/http1/read.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mitmproxy/net/http/http1/read.py b/mitmproxy/net/http/http1/read.py index 6eb30709..d0493da4 100644 --- a/mitmproxy/net/http/http1/read.py +++ b/mitmproxy/net/http/http1/read.py @@ -158,8 +158,9 @@ def connection_close(http_version, headers): """ Checks the message to see if the client connection should be closed according to RFC 2616 Section 8.1. + If we don't have a Connection header, HTTP 1.1 connections are assumed + to be persistent. """ - # At first, check if we have an explicit Connection header. if "connection" in headers: tokens = get_header_tokens(headers, "connection") if "close" in tokens: @@ -167,9 +168,7 @@ def connection_close(http_version, headers): elif "keep-alive" in tokens: return False - # If we don't have a Connection header, HTTP 1.1 connections are assumed to - # be persistent - return http_version != "HTTP/1.1" and http_version != b"HTTP/1.1" # FIXME: Remove one case. + return http_version != "HTTP/1.1" and http_version != b"HTTP/1.1" def expected_http_body_size(request, response=None): |