- serving PHP as application/octet-stream



Tech Evangelism Graveyard
English US
14 years ago
3 years ago


(Reporter: klw, Unassigned)






14 years ago
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040215 Firebird/0.8.0+

When going to any .php page on an Open With dialog box
is displayed instead of the actual page.  here is an example href from that page:

<a href="" target="_blank"><font
face="Georgia, Times New Roman, Times, serif"><strong>CLICK HERE

Reproducible: Always
Steps to Reproduce:
1. go to
2. click nearly any link, most are just whatever.php
3. dig the frustration of being presented an Open With box instead of the actual

Actual Results:  
Open With dialog box.

Expected Results:  
displayed the actual page.

This was happening with the Release version 0.8, so I downloaded and used the
nightly snapshot release 0.8+ 

Got the same result.

Comment 1

14 years ago
I also tried creating a new profile and testing this issue.
I received the same results.

Comment 2

14 years ago
HTTP/1.x 200 OK
Server: Microsoft-IIS/5.0
MicrosoftOfficeWebServer: 5.0_Pub
Date: Mon, 16 Feb 2004 07:45:04 GMT
Content-Type: application/octet-stream
Accept-Ranges: bytes
Last-Modified: Wed, 21 Jan 2004 11:23:45 GMT
Etag: "81248b811e0c31:993"
Content-Length: 46447

The server is misconfigured.  The browser is doing what it's supposed to when
served a file as application/octet-stream

The fix is for the site to fix its server setting.  You might write to them and
ask them too.
Assignee: firefox → english-us
Component: General → English US
Ever confirmed: true
OS: Windows XP → All
Priority: -- → P3
Product: Firefox → Tech Evangelism
QA Contact: english-us
Hardware: PC → All
Summary: Going to any .php page at this URL will cause an Open WIth dialog box to be displayed. → - serving PHP as application/octet-stream

Comment 3

14 years ago
Okay.  Thank you.
Why does it work okay in IE?
And what should I advise to set their server Content-Type to?

Comment 4

13 years ago
(In reply to comment #3)
> Okay.  Thank you.
> Why does it work okay in IE?
> And what should I advise to set their server Content-Type to?

Internet Explorer is a piece of non-compliant ****.
It completely ignores the MIME type, using only the filename extension.  THIS IS
BAD!  Mozilla properly reads the MIME type to determine what to do with the
data; the filename extension is irrelevant.

The web server itself probably does not need to be reconfigured.  Rather, the
authors who wrote the PHP script should write the script to send a
"Content-Type: text/html" HTTP header when it produces it's output.

PHP itself does not have a specific MIME type, because it's a programming
language which can output a variety of data formats.  (for example, if a PHP
script outputs a JPEG image, it should send a "Content-Type: image/jpeg" header.
 If it outputs a web page, it should send the previously mentioned text/html)
Last Resolved: 9 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.