[Zope] Call Zope objects using wget

Paolo Dina paolo at php3.it
Thu Sep 16 04:39:33 EDT 2004


Dieter Maurer wrote:
> Paolo Dina wrote at 2004-9-15 12:59 +0200:
> 
>>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,
> 
> 
> Are you sure?
> 
> 
>>while calling the script via Test tab 
> 
>>from the ZMI works correctly.

Well, digging with more time into the problem... I have found that 
almost surely the cause is the presence of CookieCrumbler (which I 
didn't even mention in the previous mail), used for authentication in 
that Zope site.

Using lynx to invoke the script instead of wget solves the problem.
This is because the user agent must be able to accept the cookie __ac, 
and Lynx fully supports cookies handling, so I have found this "workaround":

/usr/bin/lynx --accept_all_cookies --auth=myuser:mypassword 
"http://my.url.it/intranet/reset_portal_content/ZScriptHTML_tryForm?__ac_name=myuser&__ac_password=mypassword" 
-dump > /dev/null

Paolo


More information about the Zope mailing list