Skip to content

Commit 538b72a

Browse files
committed
Switch to rst for PyPI compatibility.
1 parent 1c180c2 commit 538b72a

File tree

2 files changed

+29
-22
lines changed

2 files changed

+29
-22
lines changed

README

+29-22
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,63 @@
11

2-
# rfc6266
2+
rfc6266
3+
~~~~~~~
34

4-
This module parses and generates HTTP Content-Disposition headers.
5+
This module parses and generates HTTP ``Content-Disposition`` headers.
56
These headers are used when getting resources for download;
67
they provide a hint of whether the file should be downloaded,
78
and of what filename to use when saving.
89

9-
# Usage
10+
Usage
11+
~~~~~
1012

11-
## Receiver
13+
Receiver
14+
--------
1215

13-
`parse_headers` builds a `ContentDisposition` object from the
14-
`Content-Disposition` header and (as a fallback) the document
16+
``parse_headers`` builds a ``ContentDisposition`` object from the
17+
``Content-Disposition`` header and (as a fallback) the document
1518
location. Shortcuts work with response objects from httplib2
1619
and the requests library.
1720

18-
Important attributes of `ContentDisposition` are `is_inline`,
19-
`filename_unsafe`, `filename_sanitized`.
21+
Important attributes of ``ContentDisposition`` are ``is_inline``,
22+
``filename_unsafe``, ``filename_sanitized``.
2023

21-
## Sender
24+
Sender
25+
------
2226

23-
`build_header` builds a header value from a filename.
27+
``build_header`` builds a header value from a filename.
2428

25-
# Security
29+
Security
30+
~~~~~~~~
2631

27-
The Content-Disposition filename should be used with caution.
32+
The ``Content-Disposition`` filename should be used with caution.
2833
Do not let the sender overwrite an arbitrary filesystem location,
2934
pick arbitrary extensions or filenames with special meaning,
3035
pick filenames containing unusual or misleading characters, etc.
3136
Read RFC 6266 section 4.3 for more details.
3237

33-
# Compatibility
3438

35-
Currently tested under Python 2.7, Python 2.6, Python 3.2, and PyPy (1.7).
39+
Testing
40+
~~~~~~~
3641

37-
# Testing
38-
39-
To test in the current Python implementation:
42+
To test in the current Python implementation::
4043

4144
py.test
4245

43-
To test compatibility across Python releases:
46+
To test compatibility across Python releases::
4447

4548
tox
4649

47-
# References
50+
rfc6266 is currently tested under Python 2.7, Python 2.6,
51+
Python 3.2, and PyPy (1.7).
52+
53+
References
54+
~~~~~~~~~~
4855

4956
* RFC 6266 <https://tools.ietf.org/html/rfc6266>
50-
specifies the Content-Disposition header
57+
specifies the Content-Disposition header
5158
* RFC 5987 <https://tools.ietf.org/html/rfc5987>
52-
specifies a way to encode non-ascii filenames
59+
specifies a way to encode non-ascii filenames
5360
* TC 2231 <http://greenbytes.de/tech/tc2231/>
54-
is a test suite for Content-Disposition headers
61+
is a test suite for Content-Disposition headers
5562

5663

README.md README.rst

File renamed without changes.

0 commit comments

Comments
 (0)