Issue1162477
Created on 2005-03-13 16:11 by therve, last changed 2009-02-16 01:01 by ajaksu2.
|
msg60699 - (view) |
Author: Thomas Herve (therve) |
Date: 2005-03-13 16:11 |
|
Some email clients send bad-formed datetimes, not
parsed by parsedate_tz (both rfc822.py and
email._parseaddr.py).
The format not recognized is "HH.MM.SS".
I don't know if it's worth taking in account but in
doubt I give a small patch for email._parseaddr :
----------------------------------------------------------------
@@ -90,6 +100,14 @@ def parsedate_tz(data):
tss = '0'
elif len(tm) == 3:
[thh, tmm, tss] = tm
+ elif len(tm) == 1:
+ # Small hack to get HH.MM.ss
+ tm = tm[0].split(".")
+ if len(tm) == 2:
+ [thh, tmm] = tm
+ tss = '0'
+ elif len(tm) == 3:
+ [thh, tmm, tss] = tm
else:
return None
----------------------------------------------------------------
|
|
msg60700 - (view) |
Author: Χρήστος Γεωργίου (Christos Georgiou) (tzot) |
Date: 2005-03-20 10:36 |
|
Logged In: YES
user_id=539787
It would be helpful if you could provide some of these
malformed Date headers, so that test cases can be generated.
|
|
msg60701 - (view) |
Author: Thomas Herve (therve) |
Date: 2005-03-20 12:29 |
|
Logged In: YES
user_id=1038797
Of course, here's and example of malformed Date header :
"Wed, 02 Mar 2005 09.26.53 +0800".
|
|
| Date |
User |
Action |
Args |
| 2009-02-16 01:01:21 | ajaksu2 | set | stage: test needed type: feature request versions:
+ Python 2.7, - Python 2.3 |
| 2005-03-13 16:11:46 | therve | create | |
|