remove FIXME

This commit is contained in:
Thomas Kriechbaumer
2017-02-08 17:36:46 +01:00
parent b5f0342664
commit 2134b5b06a

View File

@@ -158,8 +158,9 @@ def connection_close(http_version, headers):
""" """
Checks the message to see if the client connection should be closed Checks the message to see if the client connection should be closed
according to RFC 2616 Section 8.1. 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: if "connection" in headers:
tokens = get_header_tokens(headers, "connection") tokens = get_header_tokens(headers, "connection")
if "close" in tokens: if "close" in tokens:
@@ -167,9 +168,7 @@ def connection_close(http_version, headers):
elif "keep-alive" in tokens: elif "keep-alive" in tokens:
return False return False
# If we don't have a Connection header, HTTP 1.1 connections are assumed to return http_version != "HTTP/1.1" and http_version != b"HTTP/1.1"
# be persistent
return http_version != "HTTP/1.1" and http_version != b"HTTP/1.1" # FIXME: Remove one case.
def expected_http_body_size(request, response=None): def expected_http_body_size(request, response=None):