- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 03 Sep 2009 19:10:28 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv1450 Modified Files: check Log Message: Simplify self_url_q(). Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.682 retrieving revision 1.683 diff -u -d -r1.682 -r1.683 --- check 31 Aug 2009 21:30:03 -0000 1.682 +++ check 3 Sep 2009 19:10:25 -0000 1.683 @@ -2938,19 +2938,19 @@ sub self_url_q { my ($q, $File) = @_; my $thispage = $File->{Env}->{'Self URI'} . '?'; - $thispage .= 'uri=' . uri_escape($q->param('uri')) . ';' - if $q->param('uri'); - $thispage .= 'ss=1;' if $q->param('ss'); - $thispage .= 'sp=1;' if $q->param('sp'); - $thispage .= 'noatt=1;' if $q->param('noatt'); - $thispage .= 'outline=1;' if $q->param('outline'); - $thispage .= 'No200=1;' if $q->param('No200'); - $thispage .= 'verbose=1;' if $q->param('verbose'); - $thispage .= 'group=1;' if $q->param('group'); - $thispage .= 'accept=' . uri_escape($q->param('accept')) . ';' if $q->param('accept'); - $thispage .= 'accept-language='. uri_escape($q->param('accept-language')) .';' if $q->param('accept-language'); - $thispage .= 'accept-charset='. uri_escape($q->param('accept-charset')) .';' if $q->param('accept-charset'); + # Pass-through parameters + for my $param (qw(uri accept accept-language accept-charset)) { + $thispage .= "$param=" . uri_escape($q->param($param)) . ';' + if $q->param($param); + } + + # Boolean parameters + for my $param (qw(ss sp noatt outline No200 verbose group)) { + $thispage .= "$param=1;" if $q->param($param); + } + + # Others if ($q->param('doctype') and not $q->param('doctype') =~ /(Inline|detect)/i) { $thispage .= 'doctype=' . uri_escape($q->param('doctype')) . ';';
Received on Thursday, 3 September 2009 19:10:40 UTC