summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authorbbaetz%acm.org <>2003-05-05 10:15:19 +0200
committerbbaetz%acm.org <>2003-05-05 10:15:19 +0200
commit9488a8906592564ec2e7601041f3ea5484cde3cc (patch)
treeb9308d1a3dcf639d1e561ede1186ff58afc01834 /post_bug.cgi
parentc000c0a480f2cb73f2b0b89550bbd8e496b73c9d (diff)
downloadbugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.tar.gz
bugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.tar.xz
Bug 201816 - use CGI.pm for header output
r=joel, a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi14
1 files changed, 9 insertions, 5 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 37a43afb4..76d86fe58 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -26,6 +26,7 @@
use strict;
use lib qw(.);
+use Bugzilla;
use Bugzilla::Constants;
require "CGI.pl";
@@ -55,6 +56,8 @@ use vars qw($vars $template);
ConnectToDatabase();
my $whoid = confirm_login();
+my $cgi = Bugzilla->cgi;
+
# do a match on the fields if applicable
&Bugzilla::User::match_field ({
@@ -85,16 +88,17 @@ if (!$product_id) {
# Set cookies
my $cookiepath = Param("cookiepath");
if (exists $::FORM{'product'}) {
- if (exists $::FORM{'version'}) {
- print "Set-Cookie: VERSION-$product=$::FORM{'version'} ; " .
- "path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+ if (exists $::FORM{'version'}) {
+ $cgi->send_cookie(-name => "VERSION-$product",
+ -value => $cgi->param('version'),
+ -expires => "Fri, 01-Jan-2038 00:00:00 GMT");
}
}
if (defined $::FORM{'maketemplate'}) {
$vars->{'url'} = $::buffer;
- print "Content-type: text/html\n\n";
+ print $cgi->header();
$template->process("bug/create/make-template.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
@@ -491,7 +495,7 @@ if ($::COOKIE{"BUGLIST"}) {
}
$vars->{'bug_list'} = \@bug_list;
-print "Content-type: text/html\n\n";
+print $cgi->header();
$template->process("bug/create/created.html.tmpl", $vars)
|| ThrowTemplateError($template->error());