Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rfc6266
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
rfc6266
Commits
5eea1aac
Commit
5eea1aac
authored
Jan 28, 2012
by
Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a README.
parent
dcf100e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
README
+42
-0
No files found.
README
0 → 100644
View file @
5eea1aac
# rfc6266
This module implements parsing of Content-Disposition headers.
These headers are used when getting http resources for download;
they provide a hint of whether the file should be downloaded,
and of what filename to use when saving.
# Security
The content-disposition filename should be used with caution.
Do not let the sender overwrite an arbitrary filesystem location,
pick arbitrary extensions or filenames with special meaning,
pick filenames containing unusual or misleading characters, etc.
Read RFC 6266 section 4.3 for more details.
# Usage
`ContentDisposition.from_header` builds a ContentDisposition object
from the header value. Important attributes are disposition, filename.
This module only looks at Content-Disposition, if filename is None
you should look at the document location for a fallback.
# Compatibility
Currently tested under Python 2.7.
# Testing
nosetests --all-modules --detailed-errors
# References
* RFC 6266 <https://tools.ietf.org/html/rfc6266>
specifies the Content-Disposition header
* RFC 5987 <https://tools.ietf.org/html/rfc5987>
specifies a way to encode non-ascii filenames
* TC 2231 <http://greenbytes.de/tech/tc2231/>
is a test suite for Content-Disposition headers
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment