diff options
author | bbaetz%acm.org <> | 2003-05-05 10:15:19 +0200 |
---|---|---|
committer | bbaetz%acm.org <> | 2003-05-05 10:15:19 +0200 |
commit | 9488a8906592564ec2e7601041f3ea5484cde3cc (patch) | |
tree | b9308d1a3dcf639d1e561ede1186ff58afc01834 /post_bug.cgi | |
parent | c000c0a480f2cb73f2b0b89550bbd8e496b73c9d (diff) | |
download | bugzilla-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-x | post_bug.cgi | 14 |
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()); |