summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSalvatore Bonaccorso <carnil@debian.org>2018-07-07 00:28:56 +0200
committerSalvatore Bonaccorso <carnil@debian.org>2018-07-07 00:28:56 +0200
commit470c60f5f84f359783763e9a2aaa13b77f2ebacd (patch)
tree6c5f9eb5cf3972cd20ab15dedc3ea752449a32dd /lib
parent8a51bec9f458270ee21d501555213527df284403 (diff)
parent94dae912e6fdd2ca21f90c395b8dd6c07393d3c1 (diff)
Merge branch 'jcristau/security-tracker-head'
Diffstat (limited to 'lib')
-rw-r--r--lib/python/web_support.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/python/web_support.py b/lib/python/web_support.py
index 0f58d450ac..c28452d5a0 100644
--- a/lib/python/web_support.py
+++ b/lib/python/web_support.py
@@ -664,7 +664,8 @@ class HTMLResult(Result):
self.headers['Content-Length'] = str(len(buf))
def later(req):
headers_later(req)
- req.wfile.write(buf)
+ if req.command != 'HEAD':
+ req.wfile.write(buf)
return later
class BinaryResult(Result):
@@ -686,7 +687,8 @@ class BinaryResult(Result):
headers_later = super(BinaryResult, self).flatten_later()
def later(req):
headers_later(req)
- req.wfile.write(self.contents)
+ if req.command != 'HEAD':
+ req.wfile.write(self.contents)
return later
class WebServiceBase:
@@ -804,6 +806,7 @@ class WebServiceHTTP(WebServiceBase):
finally:
service_self.lock.release()
result(self)
+ do_HEAD = do_GET
def __parse_path(self):
pos = self.path.find('?')

© 2014-2024 Faster IT GmbH | imprint | privacy policy