[Zope-dev] Zope Tests: 5 OK

2007-12-04 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list. Period Mon Dec 3 13:00:00 2007 UTC to Tue Dec 4 13:00:00 2007 UTC. There were 5 messages: 5 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2.7 Python-2.3.6 : Linux From: Zope Unit Tests Date: Mon Dec 3 20:53:57 EST 2007

[Zope-dev] Bug in zc.resourcelibrary?

2007-12-04 Thread Thomas Lotze
I found some behaviour of zc.resourcelib which I'm not sure is intended that way: The lib takes care to apply only to HTML and XML content, so it tests whether the content type (if set) is among text/html and text/xml: if content_type == 'text/html' or content_type == 'text/xml': ...

Re: [Zope-dev] Bug in zc.resourcelibrary?

2007-12-04 Thread Fred Drake
On Dec 4, 2007 9:15 AM, Benji York [EMAIL PROTECTED] wrote: Also, does case matter here? Perhaps a .lower() should be added as well. The major/minor type and the parameter names should be treated as case insensitive. There's a content-type parser in zope.publisher.contentype that should handle

Re: [Zope-dev] Bug in zc.resourcelibrary?

2007-12-04 Thread Benji York
Thomas Lotze wrote: Wouldn't a check like if content_type.split(';', 1)[0] in ('text/html', 'text/xml'): ... be more appropriate? Probably. Remember, zc.resourcelibrary's HTML injection code is a hack -- a necessary hack, but a hack none the less. I can say that because I did it.

[Zope-dev] Re: Bug in zc.resourcelibrary?

2007-12-04 Thread Thomas Lotze
Benji York wrote: Feel free to make the change you outlined, especially if this is causing you to get incorrect results in one of your apps. I've released 0.8 now, having made the change including case and whitespace normalization as well as tests for the behaviour. It's only at

Re: [Zope-dev] Re: Bug in zc.resourcelibrary?

2007-12-04 Thread Fred Drake
On Dec 4, 2007 5:43 PM, Thomas Lotze [EMAIL PROTECTED] wrote: While writing the tests I noticed that the publisher doesn't cope with whitespace and funny case on the major type, though. I don't recall if whitespace is allowed around the / in the type; it might not be. The code should probably

[Zope-dev] Re: Re: Bug in zc.resourcelibrary?

2007-12-04 Thread Thomas Lotze
Fred Drake wrote: I don't recall if whitespace is allowed around the / in the type; it might not be. The code should probably allow it on input. It wasn't even about whitespace around the / but leading whitespace in front of the major type. Feel free to make the required changes to

Re: [Zope-dev] Re: Re: Bug in zc.resourcelibrary?

2007-12-04 Thread Fred Drake
On Dec 4, 2007 5:55 PM, Thomas Lotze [EMAIL PROTECTED] wrote: It wasn't even about whitespace around the / but leading whitespace in front of the major type. Wow. It probably didn't occur to me that would be screwed up. I'll first try to get my hands on some standards document on the

[Zope-dev] Re: bug in ZopePageTemplate.py?

2007-12-04 Thread Andreas Jung
--On 10. November 2007 11:02:27 + Chris Withers [EMAIL PROTECTED] wrote: Tres Seaver wrote: MailTemplates subclass ZopePageTemplate and expect to be text/plain by default... That code is there only when reading from the default content, right? Yep. And that file is *definitely*