<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV> We are using a Python External Method to send a "post" request to a dtml-method in</DIV>
<DIV>python using the httplib library. But it's not working because of the security of the </DIV>
<DIV>method only allowes certain roles to access it. </DIV>
<DIV> </DIV>
<DIV> this is the code we are using:</DIV>
<DIV> </DIV>
<DIV> Args = urllib.urlencode(Args)<BR> Scheme, Host, Path, Parameters, Query, Frag = urlparse.urlparse(ActionUrl)<BR> </DIV>
<DIV> Contact = httplib.HTTP(Host)<BR> Contact.putrequest( "POST", Path )<BR> Contact.putheader( "Content-type", "application/x-www-form-urlencoded" )<BR> Contact.putheader( "Content-length", "%d" %len(Args) )<BR> Contact.putheader( "Accept", "text/plain" )<BR> Contact.putheader( "Host", Host )<BR> Contact.endheaders()<BR> Contact.send( Args )<BR> <BR> Reply, Message, Headers = Contact.getreply()</DIV>
<DIV> <BR> strOutput = Contact.getfile().read()</DIV>
<DIV> </DIV>
<DIV>This is response we got from the server:</DIV>
<DIV> </DIV>
<DIV>Reply = 302</DIV>
<DIV>Message = Moved Temporarily</DIV>
<DIV>Headers = Server: Zope/(Zope 2.6.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32) ZServer/1.1b1<BR>Date: Thu, 11 Dec 2003 23:45:02 GMT<BR>Bobo-Exception-File: C:\Program Files\Plone\Data\Products\CMFCore\CookieCrumbler.py<BR>Bobo-Exception-Type: Redirect<BR>Connection: close<BR>Location: <A href="http://2ksvr:85/require_login?came_from=http%3A//2ksvr%3A85/cvs/custom_report/index_html&retry=&disable_cookie_login__=1">http://2ksvr:85/require_login?came_from=http%3A//2ksvr%3A85/cvs/custom_report/index_html&retry=&disable_cookie_login__=1</A><BR>Bobo-Exception-Value: <A href="http://2ksvr:85/require_login?came_from=http%3A//2ksvr%3A85/cvs/custom_report/index_html&retry=&disable_cookie_login__=1">http://2ksvr:85/require_login?came_from=http%3A//2ksvr%3A85/cvs/custom_report/index_html&retry=&disable_cookie_login__=1</A><BR>Etag: <BR>Content-Length: 0<BR>Bobo-Exception-Line: 200<BR></DIV>
<DIV>Any suggestions so we can make it work???</DIV>
<DIV> </DIV>
<DIV> Ruben Montejano.</DIV>
<DIV> email: <A href="mailto:rubemontejano@yahoo.com">rubemontejano@yahoo.com</A></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=21260/*http://photos.yahoo.com">New Yahoo! Photos - easier uploading and sharing</a>