From: cjwatson <>
Date: Fri, 22 Nov 2002 00:19:30 +0000 (-0800)
Subject: [project @ 2002-11-21 16:19:30 by cjwatson]
X-Git-Tag: release/2.6.0~990
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=741a38a39ab257fde2d2042d03ea999f24398f6c;p=debbugs.git

[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 ...)
---

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();