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.

Author vstinner
Recipients Felix.Gröbert, devin, pje, vstinner
Date 2013-02-25.18:37:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361817455.03.0.404836600469.issue11671@psf.upfronthosting.co.za>
In-reply-to
Content
+        if bad_header_value_re.search(_value):
+            error_str = "Bad header value: {0!r} (bad char: {1!r})"
+            raise AssertionError(error_str.format(
+                _value, bad_header_value_re.search(_value).group(0)))

Why do you search the character twice? You can do something like:

match = bad_header_value_re.search(_value)
if match is not None:
  ... match..group(0) ...

Why do you only check value? You should also check _params:

parts = "; ".join(parts)
match = bad_header_value_re.search(parts)
...

And you should also check the name.

Should we do the same checks in httplib?
History
Date User Action Args
2013-02-25 18:37:35vstinnersetrecipients: + vstinner, pje, devin, Felix.Gröbert
2013-02-25 18:37:35vstinnersetmessageid: <1361817455.03.0.404836600469.issue11671@psf.upfronthosting.co.za>
2013-02-25 18:37:35vstinnerlinkissue11671 messages
2013-02-25 18:37:34vstinnercreate