The pain of Zope

Never mind how, I find myself implementing some code in a Zope External Method. This is a form submission, so I'm trying to get the original HTTP request data. To its credit, I am able to get a request object without too much pain:

def repost(self):
request = self.REQUEST
...
Fine, but what sort of object is "request"? A little reflection reveals it's an HTTPRequest object. OK, searching python.org yields... nothing. Googling reveals... nothing. Finally I grep the entire Plone source tree (including Zope) (thank you cygwin!) and I find it's in the... ZPublisher module? Great, I've found it, but I'm reduced using grep and less to find documentation?

Just to put it to the test, and now that I know more specifically what I'm looking for, I search zope.org to see if there's any documentation for this module. Searching for "HTTPRequest" yields 121 hits, the first being:
HTTPRequest.py
Description: Modified HTTPRequest.py to handle SOAP requests
http://www.zope.org/Members/sangeetha/HTTPRequest.py
2004-10-18 13:56:53
Cripes, I can't get a better hit than a patch from 2004? Scanning the rest of the first page yields more garbage. Perhaps Google can help me.

First Google try: ZPublisher.HTTPRequest site:zope.org

Totally overwhelmed with mailing list entries about useless code in ZPublisher; no documentation on first, second, third pages.

Second Goog: ZPublisher.HTTPRequest site:zope.org -site:mail.zope.org

Overwhelmed with commits to svn.zope.org.

Third Goog: ZPublisher.HTTPRequest site:zope.org -site:mail.zope.org -site:svn.zope.org

Overwhelmed with commits to cvs.zope.org

Fourth Goog: ZPublisher.HTTPRequest site:zope.org -site:mail.zope.org -site:svn.zope.org -site:cvs.zope.org

Looks like I'm getting past the chatter so some of the meat; still my first hit is:

Zope.org - Logger hack for FunctionalTests

lib\python\ZPublisher\HTTPRequest.py copy .\ZServer\HTTPServer_LOGGING.py .\ZServer\HTTPServer.py copy .\ZServer\medusa\http_server_LOGGING.py . ...
www.zope.org/Members/tarnold/ftlog/index_html - 18k -
Cached - Similar pages - Note this

Yikes, logger hack? I don't think so.
I do think I've dicked around with this long enough, so I go back to reading the source. If I ever get a line on a good Zope documentation URL, I'll delicious it for y'all.

Comments

Unknown said…
Oh, the memories this evokes. Reminds me of when I tried to build a RESTful web service in Plone. Want docs on the Zope HTTP classes? "Use the source, Luke!"