Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Combine repeated headers with the same name into a single comma-separ…

  • Loading branch information...
commit 8c096b231ccf3285b5384bb9b03b24a4a4821bd7 1 parent 40ce72c
Ben Darnell authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 tornado/httpclient.py
View
7 tornado/httpclient.py
@@ -421,7 +421,12 @@ def _curl_header_callback(headers, header_line):
if len(parts) != 2:
logging.warning("Invalid HTTP response header line %r", header_line)
return
- headers[parts[0].strip()] = parts[1].strip()
+ name = parts[0].strip()
+ value = parts[1].strip()
+ if name in headers:
+ headers[name] = headers[name] + ',' + value
+ else:
+ headers[name] = value
def _curl_debug(debug_type, debug_msg):
Please sign in to comment.
Something went wrong with that request. Please try again.