[Zope] perplexed by hanging Python script
Skip Montanaro
skip@pobox.com
Sat, 16 Nov 2002 14:50:18 -0600
Environment:
OS: MacOSX 10.2.2
Server: Zope 2.5.1
Browsers: MSIE 5.2, Opera 6.0beta2, links 0.96, httpget, wget
This simple Python script hangs when accessed via direct URL or the ZMI (I
didn't try the ZMI with links):
## Script (Python) "empty"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
return []
If I call it via xmlrpc it succeeds:
% python
Python 2.3a0 (#6, Nov 13 2002, 19:57:35)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xmlrpclib
>>> utils = xmlrpclib.ServerProxy("http://localhost:8080/dcII/utils")
>>> print utils.empty()
[]
If I fetch the URL using wget, it responds:
% wget http://localhost:8080/dcII/utils/empty
--14:34:52-- http://localhost:8080/dcII/utils/empty
=> `empty'
Resolving localhost... done.
Connecting to localhost[127.0.0.1]:8080... connected.
HTTP request sent, awaiting response... 204 No Content
Length: 0
[ <=> ] 0 --.--K/s
14:34:52 (0.00 B/s) - `empty' saved [0/0]
httpget tells me:
% httpget http://localhost:8080/dcII/utils/empty
URL host = localhost
URL port = 8080
URL path = /dcII/utils/empty
Connected to localhost:8080
Sending request...
GET /dcII/utils/empty HTTP/1.0
Host: localhost
User-agent: httpget
Accept: text/html, */*
Reading reply...
----- HTTP reply header follows -----
HTTP/1.0 204 No Content
Server: Zope/(unreleased version, python 2.1.3, darwin6) ZServer/1.1b1
Date: Sat, 16 Nov 2002 20:37:36 GMT
Connection: close
Etag:
Content-Length: 0
----- HTTP reply header end -----
Connection closed.
Total of 182 bytes read in 0.126 seconds
It seems there is some sort of protocol problem (miscalculation of response
length perhaps?). Is this a known bug in 2.5.1? If so, is there a patch
available to fix it (I'm not in a position to upgrade Zope). I tried
searching the Zope Collector but saw nothing obvious in about five minutes
of searching.
Thx,
--
Skip Montanaro - skip@pobox.com
http://www.mojam.com/
http://www.musi-cal.com/