durusmail: quixote-users: publisher.log_request()
publisher.log_request()
2004-02-23
2004-02-24
2004-02-24
Jason Sibre (2 parts)
publisher.log_request()
Jason Sibre
2004-02-24
> It sounds like a bug.  A patch would be nice. :-)


One patch, comin' up!

This moves the try/except/except block from Publisher.publish() into
Publisher.process_request(), and fixes medusa_http and twisted_http to
realize that (because they didn't call publish()).  I don't see any
requirement for changes to the F/S/CGI handlers.

This has the effect of letting log_request() work for all requests (even
those that result in exceptions, provided the exceptions don't take Quixote
out).  Moving the try/ex/ex block seemed the best approach, because that
code was already duplicated in three places, and the log_request would have
had to do the same, without the refactorization.

I've been working with Medusa, and all looks well.  I did a cursory test
with Twisted, and it seemed Ok, but it was really cursory.




Jason Sibre
reply