Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

support HEAD requests

  • Loading branch information...
commit 0327e5b4c0a74bf4d114db78e91b1898f5300a89 1 parent 554dccc
@progrium progrium authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 bin.py
View
7 bin.py
@@ -25,6 +25,13 @@ def post(self):
urlfetch.fetch(url=self.request.query_string.replace('http://', 'http://hookah.webhooks.org/'),
payload=urllib.urlencode(self.request.POST.items()), method='POST')
self.redirect('/%s' % bin.name)
+
+ def head(self):
+ bin = self._get_bin()
+ if self.request.query_string:
+ self._record_post(bin, True)
+ else:
+ self._record_post(bin)
def _record_post(self, bin, use_get=False):
post = Post(bin=bin, remote_addr=self.request.remote_addr)
Please sign in to comment.
Something went wrong with that request. Please try again.