commit | f36d804b3b5a73814287535bbc840c3df33d9e2d | [log] [tgz] |
---|---|---|
author | Barry Warsaw <barry@python.org> | Tue Aug 20 14:50:09 2002 +0000 |
committer | Barry Warsaw <barry@python.org> | Tue Aug 20 14:50:09 2002 +0000 |
tree | 717a49b56b3295d13899180d5f777d38f7cd97e4 | |
parent | dfea3b3963228fc149c586463b01fcaf39510902 [diff] |
get_content_type(), get_content_maintype(), get_content_subtype(): RFC 2045, section 5.2 states that if the Content-Type: header is syntactically invalid, the default type should be text/plain. Implement minimal sanity checking of the header -- it must have exactly one slash in it. This closes SF patch #597593 by Skip, but in a different way. Note that these methods used to raise ValueError for invalid ctypes, but now they won't.