Bug #61286 [Com]: If the trailing path that follows a script contains a dot PATH_INFO is not set

From: Date: Sat, 02 Jan 2016 03:07:00 +0000
Subject: Bug #61286 [Com]: If the trailing path that follows a script contains a dot PATH_INFO is not set
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198358@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61286&edit=1

 ID:                 61286
 Comment by:         dusan dot maliarik at gmail dot com
 Reported by:        galacticvoid+php at gmail dot com
 Summary:            If the trailing path that follows a script contains
                     a dot PATH_INFO is not set
 Status:             Wont fix
 Type:               Bug
 Package:            Built-in web server
 Operating System:   OSX
 PHP Version:        5.4.0
 Assigned To:        laruence
 Block user comment: N
 Private report:     N

 New Comment:

Here

https://github.com/getgrav/grav-plugin-admin/issues/3

apparently there are apps that are forced to include special case for the built-in web server,
because it doesn't behave like expected. That kind of counters the goal of it, right?


Previous Comments:
------------------------------------------------------------------------
[2016-01-02 03:05:17] dusan dot maliarik at gmail dot com

Dear @laruence, this is non-sense. If you allow it to be routed to the script, but you don't
set the PATH_INFO key to what is expected, then that's surely a bug that deserves fixing. If
the script returns 404, go ahead, serve the static file.

------------------------------------------------------------------------
[2015-10-13 11:30:18] kenorb at niepodam dot pl

This happens for drush which uses PHP's built-in server.

Related GH issues:
- https://github.com/drush-ops/drush/issues/752
- https://github.com/drush-ops/drush/issues/1641
- https://github.com/drush-ops/drush/pull/1658

------------------------------------------------------------------------
[2014-10-13 14:14:26] tamas at bartatamas dot hu

I've been debugging FuelPHP's router because of this bug. Does it really make sense? Why
would a dot mean a static file request? Also, if it does, why was the router fired at all?
I don't really want to run Apache to make my app able to handle requests with a dot in the URI.

------------------------------------------------------------------------
[2012-03-07 05:58:29] laruence@php.net

Built-in server will consider it as a static file request if there is a dot in the  
SCRIPT_NAME. 

so, it's kind of expect behavior. thanks

------------------------------------------------------------------------
[2012-03-05 16:52:21] galacticvoid+php at gmail dot com

Sorry I was working on this for an hour and I left out the router part.

Using router.php (The only file in __DIR__ is index.php):

   if (file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI'])) {
     return false;
   } else {
     include_once 'index.php';
   }

The results of $_SERVER['PATH_INFO'] when calling http://localhost:8000/notset 
is: /notset.


The results of $_SERVER['PATH_INFO'] when calling http://localhost:8000/not.set 
is: PHP Notice: Undefined index: 
PATH_INFO.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=61286


--
Edit this bug report at https://bugs.php.net/bug.php?id=61286&edit=1


Thread (19 messages)

« previous php.bugs (#198358) next »