Hello,

The guide touches on something like this at
http://perl.apache.org/guide/browserbugs.html#Preventing_QUERY_STRING_from_get
But I'm trying to fixup query strings that I don't have control over.

CGI.pm complains when it gets a bad query string.  For example,

53) ~ %setenv REQUEST_METHOD GET

54) ~ %setenv QUERY_STRING '&query=123&color=blue'
                            ^-- extra '&'

55) ~ %perl -MCGI -we 'print CGI::param('color'),"\n"'

Use of uninitialized value at /usr/local/lib/perl5/5.00503/CGI.pm line 515.
Use of uninitialized value at /usr/local/lib/perl5/5.00503/CGI.pm line 515.
Use of uninitialized value at (eval 2) line 8.
Use of uninitialized value at (eval 2) line 8.
Use of uninitialized value at /usr/local/lib/perl5/5.00503/CGI.pm line 502.
Use of uninitialized value at /usr/local/lib/perl5/5.00503/CGI.pm line 502.
Use of uninitialized value at /usr/local/lib/perl5/5.00503/CGI.pm line 502.
blue

Under mod_cgi I can clean up $ENV{QUERY_STRING} at the start of a program
by removing leading '&' and double '&', but that doesn't work, obviously,
under mod_perl.

Could someone suggest a way to clean up the query string from within an
Apache::Registry script?  Is it possible to just write a cleaned up query
string to args() at the start of my Registry script, or is that too late in
the request?

Thanks,


Bill Moseley
mailto:[EMAIL PROTECTED]

Reply via email to