mirror of https://github.com/python/cpython
b110bad2d9
points out there are really two types of continued headers defined in this RFC (i.e. "encoded" parameters with the form "name*0*=" and unencoded parameters with the form "name*0="), but we were were handling them both the same way and that isn't correct. This patch should be much more RFC compliant in that only encoded params are %-decoded and the charset/language information is only extract if there are any encoded params in the segments. If there are no encoded params then the RFC says that there will be no charset/language parts. Note however that this will change the return value for Message.get_param() in some cases. For example, whereas before if you had all unencoded param continuations you would have still gotten a 3-tuple back from this method (with charset and language == None), you will now get just a string. I don't believe this is a backward incompatible change though because the documentation for this method already indicates that either return value is possible and that you must do an isinstance(val, tuple) check to discriminate between the two. (Yeah that API kind of sucks but we can't change /that/ without breaking code.) Test cases, some documentation updates, and a NEWS item accompany this patch. |
||
---|---|---|
.. | ||
RPM | ||
Vim | ||
ACKS | ||
AIX-NOTES | ||
BeOS-NOTES | ||
BeOS-setup.py | ||
HISTORY | ||
NEWS | ||
NEWS.help | ||
PURIFY.README | ||
Porting | ||
README | ||
README.OpenBSD | ||
README.valgrind | ||
RFD | ||
SpecialBuilds.txt | ||
build.sh | ||
cheatsheet | ||
developers.txt | ||
find_recursionlimit.py | ||
gdbinit | ||
indent.pro | ||
pymemcompat.h | ||
python-config.in | ||
python-mode.el | ||
python.man | ||
setuid-prog.c | ||
valgrind-python.supp | ||
vgrindefs |
README
Python Misc subdirectory ======================== This directory contains files that wouldn't fit in elsewhere. Some documents are only of historic importance. Files found here ---------------- ACKS Acknowledgements AIX-NOTES Notes for building Python on AIX BeOS-NOTES Notes for building on BeOS BeOS-setup.py setup.py replacement for BeOS, see BeOS-NOTES cheatsheet Quick summary of Python by Ken Manheimer find_recursionlimit.py Script to find a value for sys.maxrecursionlimit gdbinit Handy stuff to put in your .gdbinit file, if you use gdb HISTORY News from previous releases -- oldest last HPUX-NOTES Notes about dynamic loading under HP-UX indent.pro GNU indent profile approximating my C style NEWS News for this release (for some meaning of "this") Porting Mini-FAQ on porting to new platforms PURIFY.README Information for Purify users pymemcompat.h Memory interface compatibility file. python.man UNIX man page for the python interpreter python-mode.el Emacs mode for editing Python programs README The file you're reading now README.valgrind Information for Valgrind users, see valgrind-python.supp RFD Request For Discussion about a Python newsgroup RPM (Old) tools to build RPMs SpecialBuilds.txt Describes extra symbols you can set for debug builds setuid-prog.c C helper program for set-uid Python scripts vgrindefs Python configuration for vgrind (a generic pretty printer) valgrind-python.supp Valgrind suppression file, see README.valgrind