draft-ietf-httpbis-content-disp-02.txt   draft-ietf-httpbis-content-disp-03.txt 
HTTPbis Working Group J. Reschke HTTPbis Working Group J. Reschke
Internet-Draft greenbytes Internet-Draft greenbytes
Updates: 2616 (if approved) September 22, 2010 Updates: 2616 (if approved) October 25, 2010
Intended status: Standards Track Intended status: Standards Track
Expires: March 26, 2011 Expires: April 28, 2011
Use of the Content-Disposition Header Field in the Use of the Content-Disposition Header Field in the
Hypertext Transfer Protocol (HTTP) Hypertext Transfer Protocol (HTTP)
draft-ietf-httpbis-content-disp-02 draft-ietf-httpbis-content-disp-03
Abstract Abstract
HTTP/1.1 defines the Content-Disposition response header field, but HTTP/1.1 defines the Content-Disposition response header field, but
points out that it is not part of the HTTP/1.1 Standard. This points out that it is not part of the HTTP/1.1 Standard. This
specification takes over the definition and registration of Content- specification takes over the definition and registration of Content-
Disposition, as used in HTTP, and clarifies internationalization Disposition, as used in HTTP, and clarifies internationalization
aspects. aspects.
Editorial Note (To be removed by RFC Editor before publication) Editorial Note (To be removed by RFC Editor before publication)
skipping to change at page 1, line 34 skipping to change at page 1, line 34
Disposition in the HTTP/1.1 specification, as currently revised by Disposition in the HTTP/1.1 specification, as currently revised by
the IETF HTTPbis working group. See also the IETF HTTPbis working group. See also
<http://trac.tools.ietf.org/wg/httpbis/trac/ticket/123>. <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/123>.
Discussion of this draft should take place on the HTTPBIS working Discussion of this draft should take place on the HTTPBIS working
group mailing list (ietf-http-wg@w3.org). The current issues list is group mailing list (ietf-http-wg@w3.org). The current issues list is
at <http://trac.tools.ietf.org/wg/httpbis/trac/ at <http://trac.tools.ietf.org/wg/httpbis/trac/
query?component=content-disp> and related documents (including fancy query?component=content-disp> and related documents (including fancy
diffs) can be found at <http://tools.ietf.org/wg/httpbis/>. diffs) can be found at <http://tools.ietf.org/wg/httpbis/>.
The changes in this draft are summarized in Appendix D.6. The changes in this draft are summarized in Appendix D.7.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 26, 2011. This Internet-Draft will expire on April 28, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 13 skipping to change at page 3, line 13
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 4 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 4
3. Header Field Definition . . . . . . . . . . . . . . . . . . . 4 3. Header Field Definition . . . . . . . . . . . . . . . . . . . 4
3.1. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2. Disposition Type . . . . . . . . . . . . . . . . . . . . . 5 3.2. Disposition Type . . . . . . . . . . . . . . . . . . . . . 5
3.3. Disposition Parameter: 'Filename' . . . . . . . . . . . . 5 3.3. Disposition Parameter: 'Filename' . . . . . . . . . . . . 5
3.4. Disposition Parameter: Extensions . . . . . . . . . . . . 6 3.4. Disposition Parameter: Extensions . . . . . . . . . . . . 7
3.5. Extensibility . . . . . . . . . . . . . . . . . . . . . . 6 3.5. Extensibility . . . . . . . . . . . . . . . . . . . . . . 7
4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5. Internationalization Considerations . . . . . . . . . . . . . 8 5. Internationalization Considerations . . . . . . . . . . . . . 8
6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
7.1. Registry for Disposition Values and Parameter . . . . . . 8 7.1. Registry for Disposition Values and Parameter . . . . . . 8
7.2. Header Field Registration . . . . . . . . . . . . . . . . 8 7.2. Header Field Registration . . . . . . . . . . . . . . . . 8
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 8 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9
9.1. Normative References . . . . . . . . . . . . . . . . . . . 9 9.1. Normative References . . . . . . . . . . . . . . . . . . . 9
9.2. Informative References . . . . . . . . . . . . . . . . . . 9 9.2. Informative References . . . . . . . . . . . . . . . . . . 9
Appendix A. Changes from the RFC 2616 Definition . . . . . . . . 10 Appendix A. Changes from the RFC 2616 Definition . . . . . . . . 10
Appendix B. Differences compared to RFC 2183 . . . . . . . . . . 10 Appendix B. Differences compared to RFC 2183 . . . . . . . . . . 10
Appendix C. Alternative Approaches to Internationalization . . . 10 Appendix C. Alternative Approaches to Internationalization . . . 11
C.1. RFC 2047 Encoding . . . . . . . . . . . . . . . . . . . . 11 C.1. RFC 2047 Encoding . . . . . . . . . . . . . . . . . . . . 11
C.2. Percent Encoding . . . . . . . . . . . . . . . . . . . . . 11 C.2. Percent Encoding . . . . . . . . . . . . . . . . . . . . . 11
C.3. Encoding Sniffing . . . . . . . . . . . . . . . . . . . . 11 C.3. Encoding Sniffing . . . . . . . . . . . . . . . . . . . . 12
C.4. Implementations (to be removed by RFC Editor before C.4. Implementations (to be removed by RFC Editor before
publication) . . . . . . . . . . . . . . . . . . . . . . . 11 publication) . . . . . . . . . . . . . . . . . . . . . . . 12
Appendix D. Change Log (to be removed by RFC Editor before Appendix D. Change Log (to be removed by RFC Editor before
publication) . . . . . . . . . . . . . . . . . . . . 12 publication) . . . . . . . . . . . . . . . . . . . . 12
D.1. Since draft-reschke-rfc2183-in-http-00 . . . . . . . . . . 12 D.1. Since draft-reschke-rfc2183-in-http-00 . . . . . . . . . . 12
D.2. Since draft-reschke-rfc2183-in-http-01 . . . . . . . . . . 12 D.2. Since draft-reschke-rfc2183-in-http-01 . . . . . . . . . . 13
D.3. Since draft-reschke-rfc2183-in-http-02 . . . . . . . . . . 12 D.3. Since draft-reschke-rfc2183-in-http-02 . . . . . . . . . . 13
D.4. Since draft-reschke-rfc2183-in-http-03 . . . . . . . . . . 12 D.4. Since draft-reschke-rfc2183-in-http-03 . . . . . . . . . . 13
D.5. Since draft-ietf-httpbis-content-disp-00 . . . . . . . . . 12 D.5. Since draft-ietf-httpbis-content-disp-00 . . . . . . . . . 13
D.6. Since draft-ietf-httpbis-content-disp-01 . . . . . . . . . 13 D.6. Since draft-ietf-httpbis-content-disp-01 . . . . . . . . . 13
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 D.7. Since draft-ietf-httpbis-content-disp-02 . . . . . . . . . 13
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1. Introduction 1. Introduction
HTTP/1.1 defines the Content-Disposition response header field in HTTP/1.1 defines the Content-Disposition response header field in
Section 19.5.1 of [RFC2616], but points out that it is not part of Section 19.5.1 of [RFC2616], but points out that it is not part of
the HTTP/1.1 Standard (Section 15.5): the HTTP/1.1 Standard (Section 15.5):
Content-Disposition is not part of the HTTP standard, but since it Content-Disposition is not part of the HTTP standard, but since it
is widely implemented, we are documenting its use and risks for is widely implemented, we are documenting its use and risks for
implementers. implementers.
skipping to change at page 5, line 32 skipping to change at page 5, line 32
Defined in [RFC2616]: Defined in [RFC2616]:
token = <token, defined in [RFC2616], Section 2.2> token = <token, defined in [RFC2616], Section 2.2>
value = <value, defined in [RFC2616], Section 3.6> value = <value, defined in [RFC2616], Section 3.6>
Defined in [RFC5987]: Defined in [RFC5987]:
ext-value = <ext-value, defined in [RFC5987], Section 3.2> ext-value = <ext-value, defined in [RFC5987], Section 3.2>
Parameter names MUST NOT be repeated; a header field value with
multiple instances of the same parameter SHOULD be treated as
invalid.
3.2. Disposition Type 3.2. Disposition Type
If the disposition type matches "attachment" (case-insensitively), If the disposition type matches "attachment" (case-insensitively),
this indicates that the user agent should prompt the user to save the this indicates that the user agent should prompt the user to save the
response locally, rather than process it normally (as per its media response locally, rather than process it normally (as per its media
type). type).
On the other hand, if it matches "inline" (case-insensitively), this On the other hand, if it matches "inline" (case-insensitively), this
implies default processing. implies default processing.
skipping to change at page 6, line 39 skipping to change at page 6, line 43
passwd"). passwd").
o Many platforms do not use Internet Media Types ([RFC2046]) to hold o Many platforms do not use Internet Media Types ([RFC2046]) to hold
type information in the file system, but rely on filename type information in the file system, but rely on filename
extensions instead. Trusting the server-provided file extension extensions instead. Trusting the server-provided file extension
could introduce a privilege escalation when the saved file is could introduce a privilege escalation when the saved file is
later opened (consider ".exe"). Thus, recipients need to ensure later opened (consider ".exe"). Thus, recipients need to ensure
that a file extension is used that is safe, optimally matching the that a file extension is used that is safe, optimally matching the
media type of the received payload. media type of the received payload.
o Recipients are advised to strip or replace character sequences
that are known to cause confusion both in user interfaces and in
filenames, such as control characters and leading and trailing
whitespace.
o Other aspects recipients need to be aware of are names that have a o Other aspects recipients need to be aware of are names that have a
special meaning in the file system or in shell commands, such as special meaning in the file system or in shell commands, such as
"." and "..", "~", "|", and also device names. "." and "..", "~", "|", and also device names.
Note: Many user agents do not properly handle escape characters
when using the quoted-string form. Furthermore, some user agents
erroneously try to perform unescaping of "percent" escapes (see
Appendix C.2), and thus might misinterpret filenames containing
the percent character followed by two hex digits.
3.4. Disposition Parameter: Extensions 3.4. Disposition Parameter: Extensions
To enable future extensions, unknown parameters SHOULD be ignored To enable future extensions, unknown parameters SHOULD be ignored
(see also [RFC2183], Section 2.8). (see also [RFC2183], Section 2.8).
3.5. Extensibility 3.5. Extensibility
Note that Section 9 of [RFC2183] defines IANA registries both for Note that Section 9 of [RFC2183] defines IANA registries both for
disposition types and disposition parameters. This registry is disposition types and disposition parameters. This registry is
shared by different protocols using Content-Disposition, such as MIME shared by different protocols using Content-Disposition, such as MIME
skipping to change at page 7, line 46 skipping to change at page 8, line 13
Here, the encoding defined in [RFC5987] is also used to encode the Here, the encoding defined in [RFC5987] is also used to encode the
non-ISO-8859-1 character. non-ISO-8859-1 character.
Same as above, but adding the "filename" parameter for compatibility Same as above, but adding the "filename" parameter for compatibility
with user agents not implementing RFC 5987: with user agents not implementing RFC 5987:
Content-Disposition: attachment; Content-Disposition: attachment;
filename="EURO rates"; filename="EURO rates";
filename*=utf-8''%e2%82%ac%20rates filename*=utf-8''%e2%82%ac%20rates
Note: as of September 2010, those user agents that do not support the Note: as of October 2010, those user agents that do not support the
RFC 5987 encoding ignore "filename*" when it occurs after "filename". RFC 5987 encoding ignore "filename*" when it occurs after "filename".
Unfortunately, some user agents that do support RFC 5987 do pick the Unfortunately, some user agents that do support RFC 5987 do pick the
"filename" rather than the "filename*" parameter when it occurs "filename" rather than the "filename*" parameter when it occurs
first; it is expected that this situation is going to improve soon. first; it is expected that this situation is going to improve soon.
5. Internationalization Considerations 5. Internationalization Considerations
The "filename*" parameter (Section 3.3), using the encoding defined The "filename*" parameter (Section 3.3), using the encoding defined
in [RFC5987], allows the server to transmit characters outside the in [RFC5987], allows the server to transmit characters outside the
ISO-8859-1 character set, and also to optionally specify the language ISO-8859-1 character set, and also to optionally specify the language
skipping to change at page 8, line 50 skipping to change at page 9, line 17
Applicable protocol: http Applicable protocol: http
Status: standard Status: standard
Author/Change controller: IETF Author/Change controller: IETF
Specification document: this specification (Section 3) Specification document: this specification (Section 3)
8. Acknowledgements 8. Acknowledgements
Thanks to Rolf Eike Beer, Bjoern Hoehrmann, Alfred Hoenes, Roar Thanks to Adam Barth, Rolf Eike Beer, Bjoern Hoehrmann, Alfred
Lauritzsen, Henrik Nordstrom, and Mark Nottingham for their valuable Hoenes, Roar Lauritzsen, Henrik Nordstrom, and Mark Nottingham for
feedback. their valuable feedback.
9. References 9. References
9.1. Normative References 9.1. Normative References
[ISO-8859-1] International Organization for Standardization, [ISO-8859-1] International Organization for Standardization,
"Information technology -- 8-bit single-byte coded "Information technology -- 8-bit single-byte coded
graphic character sets -- Part 1: Latin alphabet No. graphic character sets -- Part 1: Latin alphabet No.
1", ISO/IEC 8859-1:1998, 1998. 1", ISO/IEC 8859-1:1998, 1998.
skipping to change at page 11, line 48 skipping to change at page 12, line 16
Some user agents inspect the value (which defaults to ISO-8859-1) and Some user agents inspect the value (which defaults to ISO-8859-1) and
switch to UTF-8 when it seems to be more likely to be the correct switch to UTF-8 when it seems to be more likely to be the correct
interpretation. interpretation.
As with the approaches above, this is not interoperable and As with the approaches above, this is not interoperable and
furthermore risks misinterpreting the actual value. furthermore risks misinterpreting the actual value.
C.4. Implementations (to be removed by RFC Editor before publication) C.4. Implementations (to be removed by RFC Editor before publication)
Unfortunately, as of September 2010, neither the encoding defined in Unfortunately, as of October 2010, neither the encoding defined in
RFCs 2231 and 5987, nor any of the alternate approaches discussed RFCs 2231 and 5987, nor any of the alternate approaches discussed
above was implemented interoperably. Thus, this specification above was implemented interoperably. Thus, this specification
recommends the approach defined in RFC 5987, which at least has the recommends the approach defined in RFC 5987, which at least has the
advantage of actually being specified properly. advantage of actually being specified properly.
The table below shows the implementation support for the various The table below shows the implementation support for the various
approaches: approaches:
+---------------+------------+--------+--------------+--------------+ +---------------+------------+--------+--------------+--------------+
| User Agent | RFC | RFC | Percent | Encoding | | User Agent | RFC | RFC | Percent | Encoding |
| | 2231/5987 | 2047 | Encoding | Sniffing | | | 2231/5987 | 2047 | Encoding | Sniffing |
+---------------+------------+--------+--------------+--------------+ +---------------+------------+--------+--------------+--------------+
| Chrome | no | yes | yes | yes | | Chrome | no | yes | yes | yes |
| Firefox | yes (*) | yes | no | yes | | Firefox | yes (*) | yes | no | yes |
| Internet | no | no | yes | no | | Internet | no | no | yes | no |
| Explorer | | | | | | Explorer | | | | |
| Konqueror | yes | no | no | no | | Konqueror | yes | no | no | no |
| Opera | yes (*) | no | no | no | | Opera | yes | no | no | no |
| Safari | no | no | no | yes | | Safari | no | no | no | yes |
+---------------+------------+--------+--------------+--------------+ +---------------+------------+--------+--------------+--------------+
(*) Does not implement the fallback behavior to "filename" described (*) Does not implement the fallback behavior to "filename" described
in Section 3.3. in Section 3.3.
Appendix D. Change Log (to be removed by RFC Editor before publication) Appendix D. Change Log (to be removed by RFC Editor before publication)
Note: the issues names in the change log entries for
draft-reschke-rfc2183-in-http refer to <http://greenbytes.de/tech/
webdav/draft-reschke-rfc2183-in-http-issues.html>.
D.1. Since draft-reschke-rfc2183-in-http-00 D.1. Since draft-reschke-rfc2183-in-http-00
Adjust terminology ("header" -> "header field"). Update rfc2231-in- Adjust terminology ("header" -> "header field"). Update rfc2231-in-
http reference. http reference.
D.2. Since draft-reschke-rfc2183-in-http-01 D.2. Since draft-reschke-rfc2183-in-http-01
Update rfc2231-in-http reference. Actually define the "filename" Update rfc2231-in-http reference. Actually define the "filename"
parameter. Add internationalization considerations. Add examples parameter. Add internationalization considerations. Add examples
using the RFC 5987 encoding. Add overview over other approaches, using the RFC 5987 encoding. Add overview over other approaches,
skipping to change at page 13, line 12 skipping to change at page 13, line 34
Closed issues: Closed issues:
o <http://tools.ietf.org/wg/httpbis/trac/ticket/242>: "handling of o <http://tools.ietf.org/wg/httpbis/trac/ticket/242>: "handling of
unknown disposition types" unknown disposition types"
Slightly updated the notes about the proposed fallback behavior. Slightly updated the notes about the proposed fallback behavior.
D.6. Since draft-ietf-httpbis-content-disp-01 D.6. Since draft-ietf-httpbis-content-disp-01
None yet. Various editorial improvements.
D.7. Since draft-ietf-httpbis-content-disp-02
Closed issues:
o <http://tools.ietf.org/wg/httpbis/trac/ticket/244>: "state that
repeating parameters are invalid"
o <http://tools.ietf.org/wg/httpbis/trac/ticket/245>: "warn about
%xx in filenames being misinterpreted"
o <http://tools.ietf.org/wg/httpbis/trac/ticket/246>: "mention
control chars when talking about postprecessing the filename
parameter"
Update Appendix C.4; Opera 10.63 RC implements the recommended
fallback behavior.
Index Index
C C
Content-Disposition header 4 Content-Disposition header 4
H H
Headers Headers
Content-Disposition 4 Content-Disposition 4
 End of changes. 21 change blocks. 
23 lines changed or deleted 60 lines changed or added

This html diff was produced by rfcdiff 1.40. The latest version is available from http://tools.ietf.org/tools/rfcdiff/