[Zope] Call Zope objects using wget

Paolo Dina paolo at php3.it
Wed Sep 15 06:59:12 EDT 2004


Hi all.
I need to call a Python script (that simply creates a new folder object 
with a unique name) via wget.

When I manually invoke the command using via shell,

wget -d --spider --http-user=myuser --http-passwd=mypassword 
http://my.url.it/intranet/reset_portal_content/ZScriptHTML_tryForm

the folder object isn't created, while calling the script via Test tab 
from the ZMI works correctly.

The thing that makes me dubious against this misbehaviour, is the server 
response "302 Moved Temporarily".
This is the debug message generated by wget -d:

DEBUG output created by Wget 1.9.1 on linux-gnu.

--12:48:15-- 
http://my.url.it/intranet/reset_portal_content/ZScriptHTML_tryForm
            => `ZScriptHTML_tryForm'
Resolving my.url.it... www.xxx.yyy.zzz
Caching my.url.it => www.xxx.yyy.zzz
Connecting to my.url.it[www.xxx.yyy.zzz]:80... connected.
Created socket 3.
Releasing 0x8083c10 (new refcount 1).
---request begin---
HEAD /intranet/reset_portal_content/ZScriptHTML_tryForm HTTP/1.0
User-Agent: Wget/1.9.1
Host: my.url.it
Accept: */*
Connection: Keep-Alive
Authorization: Basic YWRtaW46a29hbG9uZQ==
Pragma: no-cache

---request end---
HTTP request sent, awaiting response... HTTP/1.1 302 Moved Temporarily
Date: Wed, 15 Sep 2004 10:42:09 GMT
Server: Zope/(unreleased version, python 2.3.3, linux2) ZServer/1.1 CPS/3.0
Bobo-Exception-Line: 56
Bobo-Exception-Value: See the server error log for details
Bobo-Exception-File: DT_Raise.py
Bobo-Exception-Type: Redirect
Etag:
Location: http://my.url.it/intranet/reset_portal_content
Content-Type: text/html;charset=iso-8859-1
Connection: close


Location: http://my.url.it/intranet/reset_portal_content [following]
Closing fd 3
--12:48:15--  http://my.url.it/intranet/reset_portal_content
            => `reset_portal_content'
Found my.url.it in host_name_addresses_map (0x8083c10)
Connecting to my.url.it[www.xxx.yyy.zzz]:80... connected.
Created socket 3.
Releasing 0x8083c10 (new refcount 1).
---request begin---
HEAD /intranet/reset_portal_content HTTP/1.0
User-Agent: Wget/1.9.1
Host: my.url.it
Accept: */*
Connection: Keep-Alive
Authorization: Basic YWRtaW46a29hbG9uZQ==
Pragma: no-cache

---request end---
HTTP request sent, awaiting response... HTTP/1.1 200 OK
Date: Wed, 15 Sep 2004 10:42:10 GMT
Server: Zope/(unreleased version, python 2.3.3, linux2) ZServer/1.1 CPS/3.0
Accept-Ranges: none
Ms-Author-Via: DAV
Last-Modified: Wed, 15 Sep 2004 06:51:45 GMT
Etag:
Content-Type: application/octet-stream
Connection: close

Length: unspecified [application/octet-stream]
Closing fd 3
200 OK

 From Zope mailing lists I have seen that many Zope users have never had 
problems using wget with Zope.. even if someone has suggested to use zeo 
+ wget in case of problems.

Any pointer to solve this issue would be highly appreciated.
TIA,
Paolo


More information about the Zope mailing list