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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
25 + 12 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Apr 19 17:01:30 2024 UTC