[Checkins] SVN: zc.resourcelibrary/trunk/ changed MIME
type handling to be more restrictive about whitespace
Jürgen Kartnaller
juergen at kartnaller.at
Fri Dec 7 04:08:32 EST 2007
Thomas Lotze wrote:
> Log message for revision 82145:
> changed MIME type handling to be more restrictive about whitespace
>
> Changed:
> U zc.resourcelibrary/trunk/CHANGES.txt
> U zc.resourcelibrary/trunk/src/zc/resourcelibrary/README.txt
> U zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py
>
> -=-
>
...
>
>
> Modified: zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py
> ===================================================================
> --- zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py 2007-12-05 18:52:21 UTC (rev 82144)
> +++ zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py 2007-12-05 21:48:15 UTC (rev 82145)
> @@ -71,8 +71,8 @@
> if isHTML(body):
> content_type = 'text/html'
>
> - # check the content type disregarding parameters, whitespace and case
> - if content_type.split(';', 1)[0].strip().lower() in (
> + # check the content type disregarding parameters and case
> + if content_type.split(';', 1)[0].lower() in (
> 'text/html', 'text/xml'):
> #act on HTML and XML content only!
>
>
This change fails if content_type is None and body is not HTML !
Can you please fix this.
Jürgen
More information about the Checkins
mailing list