5.7.11. Bugzilla::CGI¶
5.7.11.1. NAME¶
Bugzilla::CGI - CGI handling for Bugzilla
5.7.11.2. SYNOPSIS¶
use Bugzilla::CGI;
my $cgi = new Bugzilla::CGI();
5.7.11.3. DESCRIPTION¶
This package inherits from the standard CGI module, to provide additional Bugzilla-specific functionality. In general, see the CGI.pm docs|CGI for documention.
5.7.11.4. CHANGES FROM CGI.PM|CGI¶
Bugzilla::CGI has some differences from CGI.pm|CGI.
cgi_error
is automatically checked
After creating the CGI object,Bugzilla::CGI
automatically checks cgi_error, and throws a CodeError if a problem is detected.
5.7.11.5. ADDITIONAL FUNCTIONS¶
Bugzilla::CGI also includes additional functions.
canonicalise_query(@exclude)
This returns a sorted string of the parameters whose values are non-empty, suitable for use in a url.
Values in
@exclude
are not included in the result.
send_cookie
This routine is identical to the cookie generation part of CGI.pm's
cookie
routine, except that it knows about Bugzilla's cookie_path and cookie_domain parameters and takes them into account if necessary. This should be used by all Bugzilla code (instead ofcookie
or the-cookie
argument toheader
), so that under mod_perl the headers can be sent correctly, usingTo remove (expire) a cookie, use
remove_cookie
.
remove_cookie
This is a wrapper around send_cookie, setting an expiry date in the past, effectively removing the cookie.
As its only argument, it takes the name of the cookie to expire.
redirect_to_https
This routine redirects the client to the https version of the page that they're looking at, using the
sslbase
parameter for the redirection.Generally you should use Bugzilla::Util/do_ssl_redirect_if_required instead of calling this directly.
redirect_to_urlbase
Redirects from the current URL to one prefixed by the urlbase parameter.
multipart_start
Starts a new part of the multipart document using the specified MIME type. If not specified, text/html is assumed.
close_standby_message
Ends a part of the multipart document, and starts another part.
set_dated_content_disp
Sets an appropriate date-dependent value for the Content Disposition header for a downloadable resource.
5.7.11.6. SEE ALSO¶
CGI|CGI, CGI::Cookie