]> granicus.if.org Git - python/commit
Anthony Baxter's cleanup patch. Python project SF patch # 583190,
authorBarry Warsaw <barry@python.org>
Thu, 18 Jul 2002 23:09:09 +0000 (23:09 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 18 Jul 2002 23:09:09 +0000 (23:09 +0000)
commit7aeac9180e3d6df3d5db89ee7ff5941a81dc5a5d
tree0b729e7ad55be4cb686ce85bbdf9e0f8dfc8184d
parente21262ca9e286aee27741eb8bb69508a911ec10b
Anthony Baxter's cleanup patch.  Python project SF patch # 583190,
quoting:

  in non-strict mode, messages don't require a blank line at the end
  with a missing end-terminator. A single newline is sufficient now.

  Handle trailing whitespace at the end of a boundary. Had to switch
  from using string.split() to re.split()

  Handle whitespace on the end of a parameter list for Content-type.

  Handle whitespace on the end of a plain content-type header.

Specifically,

get_type(): Strip the content type string.

_get_params_preserve(): Strip the parameter names and values on both
sides.

_parsebody(): Lots of changes as described above, with some stylistic
changes by Barry (who hopefully didn't screw things up ;).
Lib/email/Message.py
Lib/email/Parser.py