mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
remove FIXME
This commit is contained in:
parent
b5f0342664
commit
2134b5b06a
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user