[Git][security-tracker-team/security-tracker][master] 2 commits: lib: add support for the HEAD HTTP method
Salvatore Bonaccorso
carnil at debian.org
Fri Jul 6 23:29:11 BST 2018
Salvatore Bonaccorso pushed to branch master at Debian Security Tracker / security-tracker
Commits:
94dae912 by Julien Cristau at 2018-07-06T23:09:24+02:00
lib: add support for the HEAD HTTP method
Fixes security-tracker-team/security-tracker#3
- - - - -
470c60f5 by Salvatore Bonaccorso at 2018-07-07T00:28:56+02:00
Merge branch 'jcristau/security-tracker-head'
- - - - -
1 changed file:
- lib/python/web_support.py
Changes:
=====================================
lib/python/web_support.py
=====================================
--- 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('?')
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/compare/8a51bec9f458270ee21d501555213527df284403...470c60f5f84f359783763e9a2aaa13b77f2ebacd
--
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/compare/8a51bec9f458270ee21d501555213527df284403...470c60f5f84f359783763e9a2aaa13b77f2ebacd
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-security-tracker-commits/attachments/20180706/784abb56/attachment-0001.html>
More information about the debian-security-tracker-commits
mailing list