On Aug 29, 2011, at 3:52 PM, Godmar Back wrote:
> Earlier versions of IE were known to sometimes disregard the Content-Type
> (which you set correctly to application/pdf) and look at the suffix of the
> URL instead. For instance, they would render HTML if you served a .html as
> text/plain, etc.
>
> You may try creating URLs that end with .pdf
>
> Separately, you're not sending a Content-Length header:
>
> HTTP request sent, awaiting response...
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Pragma: No-cache
> Cache-Control: no-cache
> Expires: Wed, 31 Dec 1969 19:00:00 EST
> Content-Type: application/pdf
> Date: Mon, 29 Aug 2011 19:47:27 GMT
> Connection: close
> Length: unspecified [application/pdf]
>
> which disregards RFC 2616,
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
RFC2616 says 'SHOULD' for that section.
HTTP/1.1 clients *must* support chunked encoding:
http://en.wikipedia.org/wiki/Chunked_transfer_encoding
(which is why any time I write an HTTP client, I always claim to be
HTTP/1.0, so I don't have to support it)
If the data's stored on disk compressed, and being decompressed
on the fly, it's pretty typical to not send Content-Length. (although,
you could argue that they should save it when storing the value,
so it's available when serving without needing to decompress
first).
-Joe
|