summaryrefslogtreecommitdiffstats
path: root/packages/migrations/0008_add_signoff_model.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-04-17 04:59:32 +0200
committerDan McGee <dan@archlinux.org>2013-04-17 04:59:32 +0200
commit31d39e75eea7fb6cdf3bb8bfd8b490d45de04ee9 (patch)
treebfb0e14f9fc4479894fd9d787699a84d0fafaf54 /packages/migrations/0008_add_signoff_model.py
parent0589853360d12a1746e2d8e92e798f2727a0b5df (diff)
downloadarchweb-31d39e75eea7fb6cdf3bb8bfd8b490d45de04ee9.tar.gz
archweb-31d39e75eea7fb6cdf3bb8bfd8b490d45de04ee9.tar.xz
Add shortcut for HEAD requests on slower views
We sometimes see some web bots and crawlers make HEAD requests to verify existence of certain pages in the application. However, they are less than kind as 20-50 requests might arrive at the same time, and package search and details pages are some of the slowest rendering pages we have due to the Django template engine. Rather than waste time generating the content only to throw it away, response as soon as we can with either a 404 or 200 response as appropriate, omitting the 'Content-Length' header completely, which seems to be acceptable by the HTTP spec. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/migrations/0008_add_signoff_model.py')
0 files changed, 0 insertions, 0 deletions