[pmwiki-users] The Content-Disposition Header Field

Patrick R. Michaud pmichaud at pobox.com
Mon Apr 18 13:01:00 CDT 2005


On Mon, Apr 18, 2005 at 11:00:06AM -0500, Monty wrote:
> 
> Is this code RFC 2183 (Communicating Presentation Information in 
> Internet Messages: The Content-Disposition Header Field) compliant?
> c.f. http://www.faqs.org/rfcs/rfc2183.html

Interesting.  The HTTP 1.1 specification (RFC 2616, January 1999)
makes no mention of RFC 2183 (August 1997) when it discusses
the Content-Disposition header
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html#sec15.5),
although it does mention RFC 1806 (which 2183 obsoleted).

Anyway, RFC 2616 says that Content-Disposition isn't part of
the HTTP 1.1 standard, and since Apache didn't provide it, I didn't
either.  However, I can see how it would be important for user
agents to have appropriate filename info for this, since the
user agent might not be able to get it from the url string,
whereas they typically could do so for a direct request.

One tricky part is that I would guess inlined image attachments to require

   Content-Disposition: inline; filename='pmwiki-32.gif'

while non-inlined attachments would need

   Content-Disposition: attachment; filename='pmwiki.txt'

Are any browsers going to care about "inline" versus "attachment" here?
My preference would be to always return "attachment", but I don't
want a browser to then try to download the inlined image rather than
displaying it inline...

Pm



More information about the pmwiki-users mailing list