From 741a38a39ab257fde2d2042d03ea999f24398f6c Mon Sep 17 00:00:00 2001 From: cjwatson <> Date: Thu, 21 Nov 2002 16:19:30 -0800 Subject: [PATCH] [project @ 2002-11-21 16:19:30 by cjwatson] Exit straight away if the HTTP method is HEAD. (master was doing lots of pointless work because somebody was issuing HTTP HEADs on every link on the index of bugs by submitter ...) --- cgi/bugreport.cgi | 5 +++++ cgi/pkgreport.cgi | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 148b0002..3d90f776 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -16,6 +16,11 @@ require '/etc/debbugs/text'; use vars(qw($gEmailDomain $gHTMLTail $gSpoolDir)); +if ($ENV{REQUEST_METHOD} eq 'HEAD') { + print "Content-Type: text/html\n\n"; + exit 0; +} + my %param = readparse(); my $tail_html; diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index a8f22883..ddae7cd5 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -13,6 +13,11 @@ require '/etc/debbugs/text'; use vars qw($gPackagePages $gWebDomain); +if ($ENV{REQUEST_METHOD} eq 'HEAD') { + print "Content-Type: text/html\n\n"; + exit 0; +} + nice(5); my %param = readparse(); -- 2.39.5