[Docs] [txt|pdf|xml|html] [Tracker] [Email] [Nits]

Versions: 00 01 02 03 draft-ietf-httpbis-content-disp

Network Working Group                                         J. Reschke
Internet-Draft                                                greenbytes
Updates: 2616 (if approved)                             October 16, 2009
Intended status: Standards Track
Expires: April 19, 2010


           Use of the Content-Disposition Header Field in the
                   Hypertext Transfer Protocol (HTTP)
                    draft-reschke-rfc2183-in-http-00

Status of this Memo

   This Internet-Draft is submitted to IETF in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on April 19, 2010.

Copyright Notice

   Copyright (c) 2009 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents in effect on the date of
   publication of this document (http://trustee.ietf.org/license-info).
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.

Abstract

   HTTP/1.1 defines the Content-Disposition Response Header, but points



Reschke                  Expires April 19, 2010                 [Page 1]

Internet-Draft         Content-Disposition in HTTP          October 2009


   out that it is not part of the HTTP/1.1 Standard.  This specification
   takes over the definition and registration of Content-Disposition, as
   used in HTTP, and clarifies internationalization considerations.

Editorial Note (To be removed by RFC Editor before publication)

   This specification is expected to replace the definition of Content-
   Disposition in the HTTP/1.1 specification, as currently revised by
   the IETF HTTPbis working group.  See also
   <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/123>.

   Distribution of this document is unlimited.  Although this is not a
   work item of the HTTPbis Working Group, comments should be sent to
   the Hypertext Transfer Protocol (HTTP) mailing list at
   ietf-http-wg@w3.org [1], which may be joined by sending a message
   with subject "subscribe" to ietf-http-wg-request@w3.org [2].

   Discussions of the HTTPbis Working Group are archived at
   <http://lists.w3.org/Archives/Public/ietf-http-wg/>.

   XML versions, latest edits and the issues list for this document are
   available from
   <http://greenbytes.de/tech/webdav/#draft-reschke-rfc2183-in-http>.  A
   collection of test cases is available at
   <http://greenbytes.de/tech/tc2231/>.


























Reschke                  Expires April 19, 2010                 [Page 2]

Internet-Draft         Content-Disposition in HTTP          October 2009


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 4
   2.  Notational Conventions  . . . . . . . . . . . . . . . . . . . . 4
   3.  Header Definition . . . . . . . . . . . . . . . . . . . . . . . 4
     3.1.  Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . 4
     3.2.  Disposition Type  . . . . . . . . . . . . . . . . . . . . . 5
     3.3.  Disposition Parameter: 'Filename' . . . . . . . . . . . . . 5
     3.4.  Disposition Parameter: Extensions . . . . . . . . . . . . . 5
   4.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
   5.  Security Considerations . . . . . . . . . . . . . . . . . . . . 6
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6
     6.1.  Registry for Disposition Values and Parameter . . . . . . . 6
     6.2.  Header Registration . . . . . . . . . . . . . . . . . . . . 6
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . 6
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . . . 6
     8.1.  Normative References  . . . . . . . . . . . . . . . . . . . 6
     8.2.  Informative References  . . . . . . . . . . . . . . . . . . 7
   Appendix A.  Changes from the RFC 2616 Definition . . . . . . . . . 7
   Appendix B.  Differences compared to RFC 2183 . . . . . . . . . . . 7
   Appendix C.  Alternative Approaches to Filename Escaping  . . . . . 8
   Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . . . 8




























Reschke                  Expires April 19, 2010                 [Page 3]

Internet-Draft         Content-Disposition in HTTP          October 2009


1.  Introduction

   HTTP/1.1 defines the Content-Disposition response header in Section
   19.5.1 of [RFC2616], but points out that is not part of the HTTP/1.1
   Standard (Section 15.5):

      Content-Disposition is not part of the HTTP standard, but since it
      is widely implemented, we are documenting its use and risks for
      implementors.

   This specification takes over the definition and registration of
   Content-Disposition, as used in HTTP.  Based on interoperability
   testing with existing User Agents, it defines a profile of the
   features defined in the MIME variant ([RFC2183]) of the header, and
   also clarifies internationalization considerations.


2.  Notational Conventions

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].

   This specification uses the augmented BNF notation defined in Section
   2.1 of [RFC2616], including its rules for linear whitespace (LWS).


3.  Header Definition

3.1.  Grammar

     content-disposition = "Content-Disposition" ":"
                            disposition-type *( ";" disposition-parm )

     disposition-type    = "inline" | "attachment" | disp-ext-type
                         ; case-insensitive
     disp-ext-type       = token

     disposition-parm    = filename-parm | disp-ext-parm

     filename-parm       = "filename" "=" value
                         | "filename*" "=" ext-value

     disp-ext-parm       = token "=" value
                         | ext-token "=" ext-value
     ext-token           = <the characters in token, followed by "*">





Reschke                  Expires April 19, 2010                 [Page 4]

Internet-Draft         Content-Disposition in HTTP          October 2009


   Defined in [RFC2616]:

     token       = <token, defined in [RFC2616], Section 2.2>
     value       = <value, defined in [RFC2616], Section 3.6>

   Defined in [draft-reschke-rfc2231-in-http]:

  ext-value   = <ext-value, defined in [draft-reschke-rfc2231-in-http], Section 3.2>

3.2.  Disposition Type

   If the disposition type matches "attachment" (case-insensitively),
   the implied suggestion is that the user agent should not display the
   response, but directly enter a "save response as..." dialog.

   On the other hand, if it matches "inline", this implies regular
   processing.  Note that this type may be used when it is desirable to
   transport filename information for the case of a subsequent, user-
   initiated, save operation.

   Other disposition types SHOULD be handled the same way as
   "attachment" ([RFC2183], Section 2.8).

3.3.  Disposition Parameter: 'Filename'

   [[anchor3: Talk about expected behavior, mention security
   considerations.]]

3.4.  Disposition Parameter: Extensions

   Parameters other then "filename" SHOULD be ignored ([RFC2183],
   Section 2.8).


4.  Examples

   Direct UA to show "save as" dialog, with a filename of "foo.html":

   Content-Disposition: Attachment; filename=foo.html

   Direct UA to behave as if the Content-Disposition header wasn't
   present, but to remember the filename "foo.html" for a subsequent
   save operation:

   Content-Disposition: INLINE; FILENAME= "foo.html"






Reschke                  Expires April 19, 2010                 [Page 5]

Internet-Draft         Content-Disposition in HTTP          October 2009


5.  Security Considerations

   [[csec: Both refer to 2183, and also mention: long filenames, dot and
   dotdot, absolute paths, mismatches between media type and extension]]


6.  IANA Considerations

6.1.  Registry for Disposition Values and Parameter

   Section 9 of [RFC2183] defines the registration procedure for new
   disposition values and parameters.

6.2.  Header Registration

   This document updates the definition of the Content-Disposition HTTP
   header in the permanent HTTP header registry (see [RFC3864]).

   Header field name:  Content-Disposition

   Applicable protocol:  http

   Status:  standard

   Author/Change controller:  IETF

   Specification document:  this specification (Section 3)


7.  Acknowledgements

   [[anchor6: TBD.]]


8.  References

8.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2183]  Troost, R., Dorner, S., and K. Moore, "Communicating
              Presentation Information in Internet Messages: The
              Content-Disposition Header Field", RFC 2183, August 1997.

   [RFC2616]  Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
              Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.



Reschke                  Expires April 19, 2010                 [Page 6]

Internet-Draft         Content-Disposition in HTTP          October 2009


   [draft-reschke-rfc2231-in-http]
              Reschke, J., "Applicability of RFC 2231 Encoding to
              Hypertext Transfer Protocol (HTTP) Headers",
              draft-reschke-rfc2231-in-http-05 (work in progress),
              October 2009.

8.2.  Informative References

   [RFC3864]  Klyne, G., Nottingham, M., and J. Mogul, "Registration
              Procedures for Message Header Fields", BCP 90, RFC 3864,
              September 2004.

URIs

   [1]  <mailto:ietf-http-wg@w3.org>

   [2]  <mailto:ietf-http-wg-request@w3.org?subject=subscribe>


Appendix A.  Changes from the RFC 2616 Definition

   Compared to Section 19.5.1 of [RFC2616], the following normative
   changes reflecting actual implementations have been made:

   o  According to RFC 2616, the disposition type "attachment" only
      applies to content of type "application/octet-stream".  This
      restriction has been removed, because user agents in practice do
      not check the content type, and it also discourages properly
      declaring the media type.

   o  The definition for the disposition type "inline" ([RFC2183],
      Section 2.1) has been re-added with a suggestion for its
      processing.

   o  This specification requires support for the extended parameter
      encoding defined in [draft-reschke-rfc2231-in-http].


Appendix B.  Differences compared to RFC 2183

   Section 2 of [RFC2183] defines several additional disposition
   parameters: "creation-date", "modification-date", "quoted-date-time",
   and "size".  These do not appear to be implemented by any user agent,
   thus have been ommitted from this specification.







Reschke                  Expires April 19, 2010                 [Page 7]

Internet-Draft         Content-Disposition in HTTP          October 2009


Appendix C.  Alternative Approaches to Filename Escaping

   [[anchor10: Mention: RFC 2047, IE, Safari]]


Index

   C
      Content-Disposition header  4

   H
      Headers
         Content-Disposition  4


Author's Address

   Julian F. Reschke
   greenbytes GmbH
   Hafenweg 16
   Muenster, NW  48155
   Germany

   Email: julian.reschke@greenbytes.de
   URI:   http://greenbytes.de/tech/webdav/


























Reschke                  Expires April 19, 2010                 [Page 8]


Html markup produced by rfcmarkup 1.109, available from https://tools.ietf.org/tools/rfcmarkup/