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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: earsyum at gmail dot com
New email:
PHP Version: OS:

 

 [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-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 23:03:36 2021 UTC