Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I vaguely recall reading that for some audio and video file types, some browsers check not only the HTTP Content-Type header but also the file extension in the URL. Is that so? And what would happen if I output, for example, an MP4 video with the correct Content-Type: video/mp4 HTTP header but an unusual file extension (or no file extension at all)?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Yes and no.

Quicktime is shocking at reading MIME types and relying on extensions. The older versions seemed to be OK. You can read my troubles about it here.

I've also seen FireFox do strange things when your MIME type and extension are different. For example, downloading a jpg with Content-Disposition=attachment without setting a MIME type it went and put a .html extension on the end of the file after it had finished downloading.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.