You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Vicki Brown <vl...@cfcl.com> on 2002/03/14 23:26:03 UTC

REQUEST_URI is empty if URL data is not encoded?

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


Re: REQUEST_URI is empty if URL data is not encoded?

Posted by Vicki Brown <vl...@cfcl.com>.
At 14:26 -0800 3/14/02, Vicki Brown wrote:
>I've run into an apparent oddity between REQUEST_URI environment variable and
>the data in my URLs.

I think this variable is being removed by some "overly conservative" code
that runs between the server and my code.

I think I can solve the problem at my end and Apache is not involved.
-- 
- 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