httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vicki Brown <...@cfcl.com>
Subject REQUEST_URI is empty if URL data is not encoded?
Date Thu, 14 Mar 2002 22:26:03 GMT
I've run into an apparent oddity between REQUEST_URI environment variable and
the data in my URLs.

I'm working with a CGI called "Web Crossing" (www.webcrossing.com).  They
create somewhat unusual URLs, e.g.

     /cgi-bin/WebX?14@162.wa9RaZx1api^4@.ee90bdd!tz=480

I can enter that into the address field of my browser and reach the desired
page.

But for the project I am doing, we are going through a proxy.  So I need to
munge the URL that is sent so it comes to my code instead; then I extract the
part that needs to be sent to WebX and send it using Perl's LWP::Request
module.

If I don't URL encode the WebX URL, in my munged version, e.g.

.../wsforums.main/a_href/cgi-bin/WebX?14@162.wa9RaZx1api^4@.ee90bdd!tz=480

the REQUEST_URI and QUERY_STRING variables come to my code empty.
ENV{PATH_INFO} = /a_href/cgi-bin/WebX
ENV{QUERY_STRING} =
ENV{REQUEST_URI} =

If I DO URL encode the WebX URL, e.g.

     .../wsforums.main/a_href/cgi-bin/WebX?14@162.wa9RaZx1api%5E4@.ee90bdd"

the REQUEST_URI and QUERY_STRING variables are set as expected
ENV{PATH_INFO} = /a_href/cgi-bin/WebX
ENV{QUERY_STRING} = 14@162.wa9RaZx1api%5E4@.ee6b280
ENV{REQUEST_URI} = ...a_href/cgi-bin/WebX?14@162.wa9RaZx1api%5E4@.ee6b280


I've found some information that tells me that sometimes "older" versions of
Apache didn't fill REQUEST_URI. We're running Apache/1.3.6 (Unix)
ApacheJServ/1.0

Help?
-- 
- Vicki

Vicki Brown     ZZZ                  Journeyman Sourceror:
P.O. Box 1269      zz  |\     _,,,---,,_        Scripts & Philtres
San Bruno, CA       zz /,`.-'`'    -.  ;-;;,_     Perl, Unix, MacOS
94066     USA         |,4-  ) )-,_. ,\ ( `'-'
mailto:vlb@cfcl.com  '---''(_/--'  `-'\_)  http://www.cfcl.com/~vlb

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message