generalize split_cgi_args so that other programs can use it. now it accepts

an argument.


git-svn-id: svn://10.0.0.236/trunk@100934 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kestes%walrus.com 2001-08-13 19:56:41 +00:00
parent a32b5ddc0b
commit 5316c3733b

View File

@ -12,8 +12,8 @@
# the completed string before it is returned.
# $Revision: 1.8 $
# $Date: 2001-07-20 19:04:58 $
# $Revision: 1.9 $
# $Date: 2001-08-13 19:56:41 $
# $Author: kestes%walrus.com $
# $Source: /home/befator/cvs/jail/cvsroot/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp.pm,v $
# $Name: not supported by cvs2svn $
@ -140,6 +140,9 @@ sub timeHTML {
sub split_cgi_args {
my %args = @_;
my @cgi_remove_arg = @{ $args{'cgi_remove_args'} };
my (%form) = ();
@ -175,11 +178,14 @@ sub split_cgi_args {
my ($key, $value) = split(/=/, $pair,2);
$form{$key} = $value;
}
# if we are being run by a webserver we are not in daemon_mode.
delete ($form{'daemon-mode'});
# if we are being run by a webserver some options are not allowed
# even if the user asks for them.
if (@cgi_remove_args) {
delete @form{@cgi_remove_args};
}
} else {
# run with argv arguments