[Zope-dev] Several bugs in Zope 2 CVS to bounce

Martijn Pieters mj@antraciet.nl
Tue, 03 Aug 1999 16:27:11 +0200


Hi all,

On a interesting project I am working on right now, we use the latest CVS 
for a production machine (I know, big nono, but the parts we use are stable 
as far as I can tell, or otherwise kicked into working order.)

I came across a few issues, I'd like to bounce around here before posting 
them to the CVS:

- ZServer/Medusa is very picky about the request formats, and doesn't 
generate proper errors about them.

For instance, if the request uses only LF for line-endings, instead of 
CRLF, nothing happens. I mean: really nothing. The request is dicarded, no 
exceptions are logged, nothing, nada.

It took me about 2 hours to figure this one out. A 'HTTP/1.1 400 Bad 
Request' would have been helpful here.

Medusa also cannot abide any extra spaces in de first request line, like: 
'POST /purchase/check  HTTP/1.0' (watch it, there are two spaces between 
'check' and 'HTTP'). This time there is an exception logged, because the 
regular expression that tries to parse this line bounces. Again, at least a 
'HTTP/1.0 500 Server Error' would have been helpful, but in this case 
should be another 400 Bad Request response.

In my particular case, the requests are sent by a third party server, and 
the owners are willing to tweak their code, and I can teak Medusa. But 
maybe Medusa should be more flexible in accepting minimally malformed 
requests, by changing LF's to CRLF's and allowing for more whitespace in 
request headers.

- MailHost objects are broken, I cannot add new ones:
Traceback (innermost last):
   File /usr/people/sneek/src/Zope2/lib/python/ZPublisher/Publish.py, line 
256, in publish_module
   File /usr/people/sneek/src/Zope2/lib/python/ZPublisher/Publish.py, line 
145, in publish
   File /usr/people/sneek/src/Zope2/lib/python/ZPublisher/BaseRequest.py, 
line 311, in traverse
   File /usr/people/sneek/src/Zope2/lib/python/App/FactoryDispatcher.py, 
line 143, in __getattr__
KeyError: manage_addMailHost

When I revert to the old __init__.py, or use an existing Mailhost object, 
and I use the sendmail tag, I get an attribute error, no such method named 
'__call--' (sorry, no traceback, haven't got the access right now). It 
happens when line 182 of SendMailTag.py is called: mhost=md[self.mailhost]

The namespace object (md) is trying to call the mailhost). Maybe this 
should read:
      mhost=md.getitem(self.mailhost, call=0)


--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------