Bug #80563 [Opn->Dup]: Development Server gives 404 on directory called "/horseisle.swf"
| From: | cmb@php.net | Date: | Wed, 30 Dec 2020 12:35:33 +0000 |
| Subject: | Bug #80563 [Opn->Dup]: Development Server gives 404 on directory called "/horseisle.swf" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-231313@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80563&edit=1
ID: 80563
Updated by: cmb@php.net
Reported by: earsyum at gmail dot com
Summary: Development Server gives 404 on directory called
"/horseisle.swf"
-Status: Open
+Status: Duplicate
Type: Bug
-Package: *Directory/Filesystem functions
+Package: Built-in web server
Operating System: Windows 10
PHP Version: 8.0.0
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Duplicate of bug #74061.
Previous Comments:
------------------------------------------------------------------------
[2020-12-30 02:12:45] earsyum at gmail dot com
Description:
------------
I have a directory called "horseisle.swf" which contains an "index.php"
the code for which is as follows:
<?php
# Decide which version to use
if($_SERVER['HTTP_USER_AGENT'] == "Shockwave Flash") # Projector
{
$file = file_get_contents("horseisle_projector.swf");
header("Content-Type: application/x-shockwave-flash");
header("Content-Length: ".sizeof($file));
echo($file);
}
else
{
$file = file_get_contents("horseisle_patched.swf");
header("Content-Type: application/x-shockwave-flash");
header("Content-Length: ".sizeof($file));
echo($file);
}
?>
i do php -S 127.0.0.1:80 but when i goto http://127.0.0.1/horseisle.swf i get told
"127.0.0.1:56396 [404]: GET /horseisle.swf - No such file or directory"
Test script:
---------------
<?php
# Decide which version to use
if($_SERVER['HTTP_USER_AGENT'] == "Shockwave Flash") # Projector
{
$file = file_get_contents("horseisle_projector.swf");
header("Content-Type: application/x-shockwave-flash");
header("Content-Length: ".sizeof($file));
echo($file);
}
else
{
$file = file_get_contents("horseisle_patched.swf");
header("Content-Type: application/x-shockwave-flash");
header("Content-Length: ".sizeof($file));
echo($file);
}
?>
Expected result:
----------------
the swf file that meets the criteria on which user agent you are using is uploaded to the client
making the request
Actual result:
--------------
404 not found error ..
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80563&edit=1