Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

Apache 2.x collapsing multiple slashes in PATH_INFO

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


kees at tweakers

Sep 18, 2006, 8:25 AM

Post #1 of 1 (291 views)
Permalink
Apache 2.x collapsing multiple slashes in PATH_INFO

Hello list,

At this moment we are using Apache 1.3.x for our webservices. We are in the
process of testing apache 2.x, but it isnt working correctly for our
purposes.

The case being:
Php or cgi script that dumps the $_SERVER variable or the printenv cgi-test
program

Apache 1.3.x:
GET /cgi-bin/printenv/1/////bla?limit=1 HTTP/1.0
PATH_INFO would than look like: /1/////bla

Apache 2.x
GET /cgi-bin/printenv/1/////bla?limit=1 HTTP/1.0
PATH_INFO will than be: /1/bla

Now our scripts use PATH_INFO to get variables, instead of using ? And & we
do this by path_info. We have multiple variables in a path_info, and they
have a fixed position, so you can get them with exploding the path_info
using '/'. This obviously wont work anymore in apache 2.x since the path
info has changed.

Why has it changed? And is there a directive to change it back to the
orinigal path_info?
Or do we have to include the following code in all our (php) scripts so we
get the 'old' path_info back?

$_SERVER['PATH_INFO'] = substr($_SERVER['PHP_SELF'],
strlen($_SERVER['SCRIPT_NAME']))

-kees


---------------------------------------------------------------------
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 [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.