Bug #74061 [NEW]: Built-in server assumes path with dot is a file

From: Date: Wed, 08 Feb 2017 14:06:13 +0000
Subject: Bug #74061 [NEW]: Built-in server assumes path with dot is a file
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207230@lists.php.net to get a copy of this message
From: aljosha dot papsch at vinexus dot eu Operating system: PHP version: Irrelevant Package: Built-in web server Bug Type: Bug Bug description:Built-in server assumes path with dot is a file Description: ------------ If the path contains a dot, built-in server assumes it's a file and tries to serve it. Try the test script with the following URLs. Last one will return 404 response but should route to index.php. $ curl http://localhost:8000/ $ curl http://localhost:8000/O_o $ curl http://localhost:8000/O.o Test script: --------------- <?php echo "hello, world\n"; Expected result: ---------------- hello, world Actual result: -------------- <!doctype html><html><head><title>404 Not Found</title><style> body { background-color: #fcfcfc; color: #333333; margin: 0; padding:0; } h1 { font-size: 1.5em; font-weight: normal; background-color: #9999cc; min-height:2em; line-height:2em; border-bottom: 1px inset black; margin: 0; } h1, p { padding-left: 10px; } code.url { background-color: #eeeeee; font-family:monospace; padding:0 2px;} </style> </head><body><h1>Not Found</h1><p>The requested resource <code class="url">/ba.z</code> was not found on this server.</p></body></html> -- Edit bug report at https://bugs.php.net/bug.php?id=74061&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74061&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74061&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74061&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74061&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74061&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74061&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74061&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74061&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74061&r=support Expected behavior: https://bugs.php.net/fix.php?id=74061&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74061&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74061&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74061&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74061&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74061&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74061&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74061&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74061&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74061&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74061&r=mysqlcfg

« previous php.bugs (#207230) next »