| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
del_param fails when specifying a header.
|
|
|
|
|
|
|
|
|
| |
Specifically, time.strftime() no longer accepts a 0 in the yday position of a
time tuple, since that can crash some platform strftime() implementations.
parsedate_tz(): Change the return value to return 1 in the yday position.
Update tests in test_rfc822.py and test_email.py
|
|
|
|
|
|
|
|
|
|
| |
\r\n only get the \n stripped, not the \r (unless it's the last header which
does get the \r stripped). Patch by Tony Meyer.
test_whitespace_continuation_last_header(),
test_strip_line_feed_and_carriage_return_in_headers(): New tests.
_parse_headers(): Be sure to strip \r\n from the right side of header lines.
|
| |
|
| |
|
| |
|
|
|
|
| |
still 7-bit.
|
|
|
|
|
|
|
|
|
|
| |
parser must recognize outer boundaries in inner parts. So cruise through the
EOF stack backwards testing each predicate against the current line.
There's still some discussion about whether this is (always) the best thing to
do. Anthony would rather parse these messages as if the outer boundaries were
ignored. I think that's counter to the RFC, but might be practically more
useful. Can you say behavior flag? (ug).
|
|
|
|
| |
Two evil samples from Anthony's MIME torture tests.
|
| |
|
|
|
|
| |
same boundary as the outer part.
|
|
|
|
| |
separating boundary for an outer part inside an inner part.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
message/delivery-status clause, and genericize it to handle all (other)
message/* content types. This lets us correctly parse 2 more of Anthony's
MIME torture tests (specifically, the message/external-body examples).
|
| |
|
|
|
|
| |
SF #951088.
|
| |
|
|
|
|
| |
documented semantics.
|
| |
|
| |
|
| |
|
|
|
|
| |
This Parser is now just a backward compatible front-end to the FeedParser.
|
| |
|
|
|
|
| |
need the _compat21 or _compat22 modules either.
|
|
|
|
| |
bunch of module globals that aren't used.
|
|
|
|
|
|
|
|
|
| |
bunch of module globals that aren't used.
__maxheaderlen -> _maxheaderlen
_handle_multipart(): This should be more RFC compliant now, and does match the
updated/fixed semantics for preamble and epilogue.
|
|
|
|
|
|
| |
(standard) tests, and doesn't throw parse errors. I still need throw
Anthony's torture test at it, but I wanted to get this checked in and off my
disk.
|
| |
|
| |
|
|
|
|
| |
message's end boundary.
|
| |
|
| |
|
|
|
|
|
| |
parser -- for now. Failure behaviour of the new parser(s) will change in any
case, so this will be revisited later anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> ----------------------------
> revision 1.20.4.4
> date: 2003/06/12 09:14:17; author: anthonybaxter; state: Exp; lines: +13 -6
> preamble is None when missing, not ''.
> Handle a couple of bogus formatted messages - now parses my main testsuite.
> Handle message/external-body.
> ----------------------------
> revision 1.20.4.3
> date: 2003/06/12 07:16:40; author: anthonybaxter; state: Exp; lines: +6 -4
> epilogue-processing is now the same as the old parser - the newline at the
> end of the line with the --endboundary-- is included as part of the epilogue.
> Note that any whitespace after the boundary is _not_ part of the epilogue.
> ----------------------------
> revision 1.20.4.2
> date: 2003/06/12 06:39:09; author: anthonybaxter; state: Exp; lines: +6 -4
> message/delivery-status fixed.
> HeaderParser fixed.
> ----------------------------
> revision 1.20.4.1
> date: 2003/06/12 06:08:56; author: anthonybaxter; state: Exp; lines: +163 -129
> A work-in-progress snapshot of the new parser. A couple of known problems:
>
> - first (blank) line of MIME epilogues is being consumed
> - message/delivery-status isn't quite right
>
> It still needs a lot of cleanup, but right now it parses a whole lot of
> badness that the old parser failed on. I also need to think about adding
> back the old 'strict' flag in some way.
> =============================================================================
|
|
|
|
|
| |
Several style fixes are suggested by Martin v. Loewis and
Marc-Andre Lemburg. Thanks!
|
|
|
|
|
|
|
|
|
|
|
| |
patch removes dependencies on the old unsupported KoreanCodecs package
and the alternative JapaneseCodecs package. Since both of those
provide aliases for their codecs, this removal just makes the generic
codec names work.
We needed to make slight changes to __init__() as well.
This will be backported to Python 2.3 when its branch freeze is over.
|
| |
|
|
|
|
|
|
| |
gets done when maxheaderlen <> 0. The header really gets wrapped via
the email.Header.Header class, which has a more sophisticated
algorithm than just splitting on semi-colons.
|
|
|
|
| |
(From SF patch #810751)
|
|
|
|
| |
Backport candidate.
|
|
|
|
|
|
|
|
|
|
|
| |
quotes. Fixes SF bug #794466, with the essential patch provided by
Stuart D. Gathman. Specifically,
_parseparam(), _get_params_preserve(): Use the parsing function that
takes quotes into account, as given (essentially) in the bug report's
test program.
Backport candidate.
|
| |
|
|
|
|
|
|
|
|
|
| |
test_rfc2231_no_language_or_charset_in_boundary(),
test_rfc2231_no_language_or_charset_in_charset(): New tests for proper
decoding of some RFC 2231 headers.
Backport candidate (as was the Utils.py 1.25 change) to both Python
2.3.1 and 2.2.4 -- will do momentarily.
|
|
|
|
|
|
|
|
|
|
| |
can be None, and what to do in that situation.
get_filename(), get_boundary(), get_content_charset(): Make sure these
handle RFC 2231 headers without a CHARSET field.
Backport candidate (as was the Utils.py 1.25 change) to both Python
2.3.1 and 2.2.4 -- will do momentarily.
|
|
|
|
|
|
| |
charset and language fields are not present, e.g. as in:
title*0="This%20is%20encoded"
|
| |
|
|
|
|
| |
SF #753617. Back port candidate (but low priority).
|