From: Michael Tremer Date: Fri, 3 Nov 2017 14:21:59 +0000 (+0100) Subject: http: Correctly pass on the HTTP method X-Git-Tag: 0.9.28~1285^2~1306 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4db53232d3d4cab42f9373f1507ba49b284b7d6;p=pakfire.git http: Correctly pass on the HTTP method Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/http.py b/src/pakfire/http.py index d446c3efd..7b20f7dec 100644 --- a/src/pakfire/http.py +++ b/src/pakfire/http.py @@ -182,7 +182,7 @@ class Client(object): data = bytes(data, "ascii") # Create a request - req = urllib.request.Request(url, data=data) + req = urllib.request.Request(url, method=method, data=data) # Add our user agent req.add_header("User-Agent", "pakfire/%s" % PAKFIRE_VERSION) @@ -207,7 +207,7 @@ class Client(object): return req def _send_request(self, req, timeout=None): - log.debug("HTTP Request to %s" % req.host) + log.debug("HTTP %s Request to %s" % (req.method, req.host)) log.debug(" URL: %s" % req.full_url) log.debug(" Headers:") for k, v in req.header_items():