You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Robert Andersson <ro...@profundis.nu> on 2003/10/15 08:11:39 UTC

Re: [users@httpd] Ms-excel downloads works with netscape 7.1but fails when tried for IE6.0 in Apache 3.27

Melukote, Sudar wrote:
> I have /etc/mime.types entry for application/vnd.ms-excel  .xls for mime
> types.
> How to force Webserver to look for specific mime type.

No clue what you mean.

You need to be a little more specific than "fails". What happens when you
request the file? Does Apache show a 200 code in the access log, and nothing
in the error log?

Internet Explorer is well known for not appriciating the MIME type sent by
the server, and thus not behaving as expected. This is likely a client
issue, and I cannot suggest a server-side workaround, but google around and
you should find plenty of discussion about this.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Ms-excel downloads works with netscape 7.1but fails when tried for IE6.0 in Apache 3.27

Posted by Leif W <wa...@usa.net>.
----- Original Message ----- 
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>
Sent: Wednesday, October 15, 2003 2:37 AM
Subject: Re: [users@httpd] Ms-excel downloads works with netscape 7.1but
fails when tried for IE6.0 in Apache 3.27


> Mike Klein wrote:
> > I have these same kinds of problems with Internet Explorer. On my site I
> > have a "live" link to a .php sample, as well as a .txt symlink to the
> > same file for downloading. By specifying .txt as file extension (there
> > are of course mime mappings for this), a web browser client (I believe)
> > should handle it as text. Mozilla-based browsers do this fine and show
> > text of php source in browser...but not Explorer...it brings up this
> > garbled munge of text and half-processed php...
>
> Do you mean that the URI to it something like /path/to/sample.php.txt ?
And
> that IE tries to render it as text/html rather than displaying it as
> text/plain?
>
> This happens because IE doesn't really listen to what type the web server
> says a resource is, but has some weird/mysterious/random algorithm based
> part on the Content-type, part on the URI, and part, seemingly, on rand().

:-)

> The workaround might be to adjust the URI.
>
> Regards,
> Robert Andersson

You could perhaps use the PHP source type?  Mileage may vary with Internet
Exploder, download versus view in browser.

AddType application/x-httpd-php-source .phps

Leif



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Ms-excel downloads works with netscape 7.1but fails when tried for IE6.0 in Apache 3.27

Posted by Robert Andersson <ro...@profundis.nu>.
Mike Klein wrote:
> I have these same kinds of problems with Internet Explorer. On my site I
> have a "live" link to a .php sample, as well as a .txt symlink to the
> same file for downloading. By specifying .txt as file extension (there
> are of course mime mappings for this), a web browser client (I believe)
> should handle it as text. Mozilla-based browsers do this fine and show
> text of php source in browser...but not Explorer...it brings up this
> garbled munge of text and half-processed php...

Do you mean that the URI to it something like /path/to/sample.php.txt ? And
that IE tries to render it as text/html rather than displaying it as
text/plain?

This happens because IE doesn't really listen to what type the web server
says a resource is, but has some weird/mysterious/random algorithm based
part on the Content-type, part on the URI, and part, seemingly, on rand().
The workaround might be to adjust the URI.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Ms-excel downloads works with netscape 7.1but fails when tried for IE6.0 in Apache 3.27

Posted by Mike Klein <mi...@sbcglobal.net>.
Robert Andersson wrote:

>Melukote, Sudar wrote:
>  
>
>>I have /etc/mime.types entry for application/vnd.ms-excel  .xls for mime
>>types.
>>How to force Webserver to look for specific mime type.
>>    
>>
>
>No clue what you mean.
>
>You need to be a little more specific than "fails". What happens when you
>request the file? Does Apache show a 200 code in the access log, and nothing
>in the error log?
>
>Internet Explorer is well known for not appriciating the MIME type sent by
>the server, and thus not behaving as expected. This is likely a client
>issue, and I cannot suggest a server-side workaround, but google around and
>you should find plenty of discussion about this.
>
>Regards,
>Robert Andersson
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>  
>
I have these same kinds of problems with Internet Explorer. On my site I 
have a "live" link to a .php sample, as well as a .txt symlink to the 
same file for downloading. By specifying .txt as file extension (there 
are of course mime mappings for this), a web browser client (I believe) 
should handle it as text. Mozilla-based browsers do this fine and show 
text of php source in browser...but not Explorer...it brings up this 
garbled munge of text and half-processed php...


mike


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org