Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit db66a7a

Browse files
committed
Merge pull request #222 from AvivC/development
HTTP11Connection.connect() takes headers=None default, not headers={}
2 parents 9a9b048 + 425da1a commit db66a7a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hyper/http11/connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def connect(self):
130130

131131
return
132132

133-
def request(self, method, url, body=None, headers={}):
133+
def request(self, method, url, body=None, headers=None):
134134
"""
135135
This will send a request to the server using the HTTP request method
136136
``method`` and the selector ``url``. If the ``body`` argument is
@@ -146,6 +146,9 @@ def request(self, method, url, body=None, headers={}):
146146
:param headers: (optional) The headers to send on the request.
147147
:returns: Nothing.
148148
"""
149+
150+
headers = headers or {}
151+
149152
method = to_bytestring(method)
150153
url = to_bytestring(url)
151154

0 commit comments

Comments
 (0)