• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Content-Type: WRONG!

 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is not an anti-Microsoft post but instead a pro-Truth post.
IE's addiction dumbs us down.
"Dumbs" meaning getting us away from the W3C recommendations for a better Web World that programmers can write code for.
Like a drug dealer, Microsoft tweaks their web browser to be more "friendly" to some users while 'breaking the law'. And making more addicts in the process.
I first discovered this many years ago
at the beginning of the MP3 craze, when I was (apparently) the first one to upload MP3 files to the web servers of two ISPs then. When I noticed that Netscape 4.x was displaying as text (gibberish of course) what was in reality a binary file, I decided to telnet to port 80 of the server and issue a HEAD HTTP command for one of the MP3 files. I was not too surprised to find out that the "Content-type:" header field was set to "text/plain"! Apparently it was too early in the MP3 revolution for them to have figured this one out.
It took me many more telnets to port 80 and many more phone calls and careful explanations to both ISPs to convince them that the problem was that they were serving the MP3 files with the wrong MIME type. As you know, "Content-type:" is one of the fields of the HTTP header returned as a response to the HEAD command request.
IE still doesn't behave correctly. Shame on Bill!
PS: Breaking News: Microsoft buys W3C and all its standards and web assets!
 
Tony Alicea
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of my first Java Swing apps, 4 yrs ago+ to retreive HTTP headers:
http://solo23.abac.com/tony-alicea/alicea/JGetHttpHeader.html
 
Tony Alicea
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In all Unix based servers (including Linux) there is a file called mime.types.
It contains a simple one-to-one mapping of MIME types to file extensions. For example,
<PRE>
audio/midimid midi kar
audio/mpegmpga mp2 mp3
</PRE>
A file extension not defined in that file defaults to <pre>text/plain</pre>
 
reply
    Bookmark Topic Watch Topic
  • New Topic