| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
bug #648119.
|
|
|
|
|
|
| |
is passed straight through to the unicode() and ustr.encode() calls.
I think it's the best we can do to address the UnicodeErrors in badly
encoded headers such as is described in SF bug #648119.
|
|
|
|
| |
need more vetting, and it will be included in Python 2.3a1.
|
| |
|
|
|
|
|
|
| |
file, needed because some binary distros (read RPMs) don't include the
test module in their standard Python package. This eliminates an
external dependency and closes SF bug # 650441.
|
|
|
|
|
|
| |
binary distros (read RPMs) don't include the test module in their
standard Python package. This eliminates an external dependency and
closes SF bug # 650441.
|
|
|
|
| |
the day in an RFC 2822 date.
|
|
|
|
|
| |
and the day number in an RFC 2822 date specification. See bug
#552345.
|
| |
|
|
|
|
|
| |
specifically that dots are allowed in obs-phrase. This fixes parsing
of dots in realnames.
|
|
|
|
| |
RFC 2822's rules w.r.t. dots in the realname part of address fields.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
where in lax parsing, the first non-header line after a header block
(e.g. the first line not containing a colon, and not a continuation),
can be treated as the first body line, even without the RFC mandated
blank line separator.
rfc822 had this behavior, and I vaguely remember problems with this,
but can't remember details. In any event, all the tests still pass,
so I guess we'll find out. ;/
This patch works by returning the non-header, non-continuation line
from _parseheader() and using that as the first header line prepended
to fp.read() if given. It's usually None.
We use this approach instead of trying to seek/tell the file-like
object.
|
|
|
|
|
|
| |
separating blank line between a header block and body text.
Tests both lax and strict parsing.
|
|
|
|
| |
body. A test message for SF bug #633527.
|
|
|
|
|
| |
#631350, where a subobject in a multipart/digest isn't a
message/rfc822.
|
|
|
|
|
|
|
|
|
|
| |
multipart/digest isn't a message/rfc822. This is legal, but counter
to recommended practice in RFC 2046, $5.1.5.
The fix is to look at the content type after setting the default
content type. If the maintype is then message or multipart, attach
the parsed subobject, otherwise use set_payload() to set the data of
the other object.
|
|
|
|
|
| |
multipart/digest isn't a message/rfc822. This is legal, but counter
to recommended practice in RFC 2046, $5.1.5.
|
| |
|
|
|
|
| |
address parsing routines. Closes SF patch #613434.
|
|
|
|
| |
one that tests the obscure bug reported in SF # 625509.
|
| |
|
|
|
|
|
|
| |
#625509. This isn't a huge problem because at the moment there are no
built-in charsets for which header_encoding is QP but body_encoding is
not.
|
|
|
|
|
|
|
| |
Ben. If s is a byte string, make sure it can be converted to unicode
with the input codec, and from unicode with the output codec, or raise
a UnicodeError exception early. Skip this test (and the unicode->byte
string conversion) when the charset is our faux 8bit raw charset.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
must be a Charset instance, not a string. The bug here was that
self._charset wasn't being converted to a Charset instance so later
.append() calls which used the default charset would break.
_split(): If the charset of the chunk is '8bit', return the chunk
unchanged. We can't safely split it, so this is the avenue of least
harm.
|
|
|
|
|
|
|
|
|
| |
8-bit data, we cannot split it safely, so return the original string
unchanged.
_is8bitstring(): Helper function which returns True when we have a
byte string that contains non-ascii characters (i.e. mysterious 8-bit
data).
|
|
|
|
| |
which we know nothing else.
|
|
|
|
|
|
|
|
|
| |
Also, it fixes a really egregious error in Header.encode() (really
in Header._encode_chunks()) that could cause a header to grow and
grow each time encode() was called if output_codec was different
from input_codec.
Also, fix a typo.
|
|
|
|
| |
Korean, and Chinese codecs.
|
| |
|
|
|
|
| |
default get_body_encoding() cannot be SHORTEST.
|
|
|
|
| |
sensitive. Coerce the argument to lower case.
|
|
|
|
|
| |
Coerce the argument to lower case. Also, since body encodings can't
be SHORTEST, default the CHARSETS failobj's second item to BASE64.
|
|
|
|
|
|
| |
the change in revision 1.11 (test_email.py) in response to SF bug
#609988. We now think that was the wrong fix and that WinZip was the
real culprit there.
|
|
|
|
|
|
|
| |
get_type(). Also, one of the regular expressions is constant so might
as well make it a module global. And, when splitting up digests,
handle lineseps that are longer than 1 character in length
(e.g. \r\n).
|
|
|
|
| |
with the standalone mimelib package.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
I seriously doubt this will break any deployed code.
Docstring consistency with the updated .tex files.
|