severity #115426 wishlist
retitle #115426 Intepretation of missing content-type field (Doesn't work with http://www.netflix.com)
tags +wontfix
thanks
This is not a bug in links, the webserver at netflix is a piece of excretum
at best (equals "generic dumb website").
HTTP transaction log:
~~~~~~~~~~~~~~~~~~~~~
HTTP/1.1 302 Moved Temporarily
Location: http://www104/Default
Server: WebLogic 5.1.0 Service Pack 9 04/06/2001 12:48:33 #105983 - 128 bit domestic version
Content-Length: 211
Connection: Close
<html><head><title>302 Moved Temporarily</title></head>
<body bgcolor="#FFFFFF">
<p>This document you requested has moved temporarily.</p>
<p>It's now at <a href="/Default">/Default</a>.</p>
</body></html>
As you can see, the server does not privide "Content-Type" field, which
is required if you want it interpreted as text/html. As per RFC2616:
==============================//============================
7.2.1 Type
[...]
Any HTTP/1.1 message containing an entity-body SHOULD include a
Content-Type header field defining the media type of that body. If
and only if the media type is not given by a Content-Type field, the
recipient MAY attempt to guess the media type via inspection of its
content and/or the name extension(s) of the URI used to identify the
! resource. If the media type remains unknown, the recipient SHOULD
! treat it as type "application/octet-stream".
==============================\\============================
As you can see, it should be included (read: it is advised not to leave it
off). If someone thinks they don't feel like using it, the browser shall
intepret it as application/octet-stream, as links does. If other browsers do
it the other way, they try to guess the content-type based on file name,
content or whatever they feel like.
This is a wishlist I believe will be quite hard to push upstream, because
the author tends not to implement "dirty hacks".
Peter