This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: HeaderParseError: no header value
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, jasonrm
Priority: normal Keywords:

Created on 2002-11-04 23:55 by jasonrm, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (3)
msg13071 - (view) Author: Jason R. Mastaler (jasonrm) Date: 2002-11-04 23:55
We all know according to rfc 2822, that a header
field should be composed of name: value, but
sometimes (as in the case of SPAM), this is not
the case.

In email 2.4.3, if a header field lacks a value portion
a HeaderParseError is raised.

For an example message and traceback, see
http://article.gmane.org/gmane.comp.python.mime.devel/325

I think when strict parsing is turned on, this 
behavior is fine, but not when it's turned off.

In lax parsing mode, I don't think this should
raise an exception. Perhaps just skipping the
bogus header field is acceptable.
msg13072 - (view) Author: Jason R. Mastaler (jasonrm) Date: 2003-02-20 19:33
Logged In: YES 
user_id=85984

As Python 2.3a2 was just released, I'm worried that
this one is going to fall through the cracks before
2.3-final is released which would be unfortunate because
it would mean I'd have to continue bundling my own
copy of email with my applications.
msg13073 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2003-03-06 06:57
Logged In: YES 
user_id=12800

When I run the referenced message (well, the subpart with
the broken header) through current Python2.3cvs's Parser, I
get a message where the line "content_id=xmailer_a0" is the
first line of the body.

We changed Parser so that in lax mode, the first non-header
like line (not necessarily a blank line) stops the header
parsing.   Since this seems as reasonable as anything else
in this case, I'm closing this bug report.
History
Date User Action Args
2022-04-10 16:05:49adminsetgithub: 37416
2002-11-04 23:55:14jasonrmcreate