W3C home > Mailing lists > Public > www-validator@w3.org > September 1999

Re: [PATCH] use CGI.pm;

From: Matthew Wickline <listbox@wickline.org>
Date: Wed, 29 Sep 1999 06:02:43 -0500
To: Gerald Oskoboiny <gerald@w3.org>
Cc: Terje Bless <link@tss.no>, W3C Validator <www-validator@w3.org>
Message-id: <01JGJ66D568299DHFE@kids.wustl.edu>
gerald@w3.org, 1999_09_28:
> It wants '=' after the parameters

I haven't tested this code, so pardon typos :) What if you
pre-process the query string before cgi.pm gets called?
Kinda like:

    BEGIN {
            =~ s/(^|\G)([^;&]+)([;&]|$)/$2=$3/g;
    use CGI qw(:cgi -newstyle_urls -private_tempfiles);

Above won't work for POSTs. Does anyone use POST to call
the validator? I suppose that sort of strategy could be
finessed to work with POSTS as well, if necessary. Just
pre-process any post request until it looks like a 
(properly munged) GET request by the time it gets to

If that works, perhaps that old funky style of passing
parameters in the PATH_INFO could be supported by changing
the above BEGIN block to something like:

    BEGIN {
        if (
            length( $ENV{PATH_INFO} )
            and not
            length( $ENV{QUERY_STRING} )
        ) {
            ( $ENV{QUERY_STRING} = $ENV{PATH_INFO} )
                =~ s|/|;|g
            =~ s/(?<=^|[;&])([^;&]+)([;&]|$)/$1=$2/g;

Received on Wednesday, 29 September 1999 07:02:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:25 UTC