[Zope] help external method and security issue
Ruben Montejano
rubemontejano at yahoo.com
Fri Dec 12 16:38:17 EST 2003
Hello,
We are using a Python External Method to send a "post" request to a dtml-method in
python using the httplib library. But it's not working because of the security of the
method only allowes certain roles to access it.
this is the code we are using:
Args = urllib.urlencode(Args)
Scheme, Host, Path, Parameters, Query, Frag = urlparse.urlparse(ActionUrl)
Contact = httplib.HTTP(Host)
Contact.putrequest( "POST", Path )
Contact.putheader( "Content-type", "application/x-www-form-urlencoded" )
Contact.putheader( "Content-length", "%d" %len(Args) )
Contact.putheader( "Accept", "text/plain" )
Contact.putheader( "Host", Host )
Contact.endheaders()
Contact.send( Args )
Reply, Message, Headers = Contact.getreply()
strOutput = Contact.getfile().read()
This is response we got from the server:
Reply = 302
Message = Moved Temporarily
Headers = Server: Zope/(Zope 2.6.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32) ZServer/1.1b1
Date: Thu, 11 Dec 2003 23:45:02 GMT
Bobo-Exception-File: C:\Program Files\Plone\Data\Products\CMFCore\CookieCrumbler.py
Bobo-Exception-Type: Redirect
Connection: close
Location: http://2ksvr:85/require_login?came_from=http%3A//2ksvr%3A85/cvs/custom_report/index_html&retry=&disable_cookie_login__=1
Bobo-Exception-Value: http://2ksvr:85/require_login?came_from=http%3A//2ksvr%3A85/cvs/custom_report/index_html&retry=&disable_cookie_login__=1
Etag:
Content-Length: 0
Bobo-Exception-Line: 200
Any suggestions so we can make it work???
Ruben Montejano.
email: rubemontejano at yahoo.com
---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20031212/1e158d05/attachment.html
More information about the Zope
mailing list