Merge pull request #1378 from niphlod/fix/1331

fixes #1331 (just rocket, really)
This commit is contained in:
mdipierro
2016-07-01 01:56:56 -05:00
committed by GitHub
+8 -8
View File
@@ -1184,17 +1184,17 @@ except ImportError:
# Define Constants # Define Constants
re_SLASH = re.compile('%2F', re.IGNORECASE) re_SLASH = re.compile('%2F', re.IGNORECASE)
re_REQUEST_LINE = re.compile(r"""^ re_REQUEST_LINE = re.compile(r"""^
(?P<method>OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT) # Request Method (?P<method>OPTIONS|GET|HEAD|POST|PUT|DELETE|PATCH|TRACE|CONNECT) # Req Method
\ # (single space) \ # single space
( (
(?P<scheme>[^:/]+) # Scheme (?P<scheme>[^:/]+) # Scheme
(://) # (://) #
(?P<host>[^/]+) # Host (?P<host>[^/]+) # Host
)? # )? #
(?P<path>(\*|/[^ \?]*)) # Path (?P<path>(\*|/[^ \?]*)) # Path
(\? (?P<query_string>[^ ]*))? # Query String (\? (?P<query_string>[^ ]*))? # Query String
\ # (single space) \ # single space
(?P<protocol>HTTPS?/1\.[01]) # Protocol (?P<protocol>HTTPS?/1\.[01]) # Protocol
$ $
""", re.X) """, re.X)
LOG_LINE = '%(client_ip)s - "%(request_line)s" - %(status)s %(size)s' LOG_LINE = '%(client_ip)s - "%(request_line)s" - %(status)s %(size)s'