| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
correct place to look for it is the Content-Type header.
Patch by Darren Worrall.
|
|
|
|
| |
Patch by Mads Kiilerich, Reviewed by Barry Warsaw.
|
| |
|
| |
|
|
|
|
|
|
| |
though with some changes by me. This patch should not be back ported or
forward ported. It's a bit too risky for 2.6 and 3.x does things fairly
differently.
|
| |
|
| |
|
| |
|
|
|
|
| |
pathological input
|
| |
|
|
|
|
| |
package, when run under -3, about using <>.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
just-created (and empty) instance. Added tests for this. Thanks
Jonathan Share.
|
|
|
|
|
|
|
|
|
|
| |
[ 1752723 ] email.message_from_string: initial line gets discarded
I added a test to assert that when the first line of text passed to
message_from_string() contains a leading space, the message ends up with the
appropriate FirstHeaderLineIsContinuationDefect on its defects list.
The bug is invalid.
|
|
|
|
|
|
|
| |
2047-like headers where there is no whitespace between encoded words. This
fix changes the matching regexp to include a trailing lookahead assertion that
the closing ?= must be followed by whitespace, newline, or end-of-string.
This also changes the regexp to add the MULTILINE flag.
|
|
|
|
|
| |
email.message.Message.{set_charset,get_content_charset}.
Will backport.
|
|
|
|
|
|
|
|
|
| |
display name of an email address, e.g.
Foo
\tBar <foo@example.com>
Test case added by Barry.
|
|
|
|
| |
iso8859_16.
|
|
|
|
| |
test for parts > 3 when we use .split(..., 2).
|
|
|
|
|
|
|
| |
it into email 4.0. Specifically, in Message.get_content_charset(), handle RFC
2231 headers that contain an encoding not known to Python, or a character in
the data that isn't in the charset encoding. Also forward port the
appropriate unit tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, instead of raising a ValueError when there is a single tick in
the parameter, simply return that the entire string unquoted, with None for
both the charset and the language. Also, if there are more than 2 ticks in
the parameter, interpret the first three parts as the standard RFC 2231 parts,
then the rest of the parts as the encoded string.
Test cases added.
Original fewer-than-3-parts fix by Tokio Kikuchi.
Resolves SF bug # 1218081. I will back port the fix and tests to Python 2.4
(email 3.0) and Python 2.3 (email 2.5).
Also, bump the version number to email 4.0.1, removing the 'alpha' moniker.
|
|
|
|
|
|
|
|
|
|
| |
Patch #1464708 from William McVey: fixed handling of nested comments in mail
addresses. E.g.
"Foo ((Foo Bar)) <foo@example.com>"
Fixes for both rfc822.py and email package. This patch needs to be back
ported to Python 2.3 for email 2.5.
|
|
|
|
|
|
| |
flag to -1 (unknown) since it can't tell from the date whether it should
be set.
patch from Aldo Cortesi
|
| |
|
|
|
|
| |
and NEWS updates.
|
|
|
|
| |
testing line ending compatibility.
|
|
|
|
| |
for it to claim it has mime-type application/octet-stream.
|
|
|
|
| |
Will port to Python 2.4.
|
| |
|
|
|
|
|
| |
Port from Python 2.3/email 2.5: Add a test for the tm_yday field is 1 in the
return of parsedate().
|
|
|
|
|
| |
Change headerRE as suggested in the bug report, so that single character
headers are accepted. Test case added too. Will backport to Python 2.4.
|
|
|
|
|
|
|
|
|
|
|
| |
SF bug #1403349 solution for email 3.0; some MUAs use the 'file' parameter
name in the Content-Distribution header, so Message.get_filename() should fall
back to using that. Will port to the Python 2.5 trunk.
Also, bump the email package version to 3.0.1 for eventual release. Of
course, add a test case too.
XXX Need to update the documentation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
caused by a self._input.readline() call that wasn't checking for the
NeedsMoreData marker.
msg_43.txt contains a message that illustrates the problem, when
email.message_from_*() is called. That interface uses the Parser API, which
splits reads into 8192 byte chunks. It so happens that for the test message,
the 8192 chunk falls inside a message/delivery-status, which is where in the
FeedParser the readline() call was that didn't check for NeedsMoreData.
I also added an assert to unreadline() so it'll be more evident if an attempt
to push back NeedsMoreData ever happens again.
Bump the email package version number.
|
|
|
|
| |
this, and add test cases.
|
|
|
|
| |
final, so I'm marking email's version number as "3.0" (e.g. final).
|
|
|
|
|
|
|
|
|
| |
in a newline, and it's an end boundary, the FeedParser wasn't recognizing it
as such. Tweak the regexp to make the ending linesep optional.
For grins, clear self._partial when closing the BufferedSubFile.
Added a test case.
|
|
|
|
|
|
| |
-- but not end -- with whitespace.
I will backport to Python 2.3.
|
|
|
|
|
|
| |
says boundaries may begin -- but not end -- with whitespace.
I will backport to Python 2.3.
|
| |
|
|
|
|
|
| |
used to replace rfc822.formatdate for protocols like HTTP (where 'GMT' must
be the timezone string).
|
|
|
|
| |
email's version number to 3.0b1.
|
|
|
|
|
|
|
| |
capturing_preamble but we found a StartBoundaryNotFoundDefect, we need to
consume all lines from the current position to the EOF, which we'll set as the
epilogue of the current message. If we're not at EOF when we return from
here, the outer message's capturing_preamble assertion will fail.
|