php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80563 Development Server gives 404 on directory called "/horseisle.swf"
Submitted: 2020-12-30 02:12 UTC Modified: 2020-12-30 12:35 UTC
From: earsyum at gmail dot com Assigned: cmb (profile)
Status: Duplicate Package: Built-in web server
PHP Version: 8.0.0 OS: Windows 10
Private report: No CVE-ID: None
 [2020-12-30 02:12 UTC] 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 ..

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-30 12:35 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Package: *Directory/Filesystem functions +Package: Built-in web server -Assigned To: +Assigned To: cmb
 [2020-12-30 12:35 UTC] cmb@php.net
Duplicate of bug #74061.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 22:01:28 2024 UTC