diff -r aea58e1cae75 -r 6d6d68c068ad Lib/urllib/request.py --- a/Lib/urllib/request.py Sun Sep 08 14:14:38 2013 +0200 +++ b/Lib/urllib/request.py Sun Sep 08 12:47:07 2013 -0400 @@ -271,7 +271,8 @@ origin_req_host = request_host(self) self.origin_req_host = origin_req_host self.unverifiable = unverifiable - self.method = method + if method: + self.method = method @property def full_url(self): @@ -320,7 +321,7 @@ def get_method(self): """Return a string indicating the HTTP request method.""" - if self.method is not None: + if getattr(self, 'method', None) is not None: return self.method elif self.data is not None: return "POST"