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

Commit

Permalink
Merge pull request #222 from AvivC/development
Browse files Browse the repository at this point in the history
HTTP11Connection.connect() takes headers=None default, not headers={}
  • Loading branch information
Lukasa committed Apr 16, 2016
2 parents 9a9b048 + 425da1a commit db66a7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hyper/http11/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def connect(self):

return

def request(self, method, url, body=None, headers={}):
def request(self, method, url, body=None, headers=None):
"""
This will send a request to the server using the HTTP request method
``method`` and the selector ``url``. If the ``body`` argument is
Expand All @@ -146,6 +146,9 @@ def request(self, method, url, body=None, headers={}):
:param headers: (optional) The headers to send on the request.
:returns: Nothing.
"""

headers = headers or {}

method = to_bytestring(method)
url = to_bytestring(url)

Expand Down

0 comments on commit db66a7a

Please sign in to comment.