<DIV>Hello,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; We are using a Python&nbsp;External Method to&nbsp;send a "post" request&nbsp;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>&nbsp;</DIV>
<DIV>&nbsp;this is the code we are using:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Args = urllib.urlencode(Args)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Scheme, Host, Path, Parameters, Query, Frag = urlparse.urlparse(ActionUrl)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact = httplib.HTTP(Host)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact.putrequest( "POST", Path )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact.putheader( "Content-type", "application/x-www-form-urlencoded" )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact.putheader( "Content-length", "%d" %len(Args) )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact.putheader( "Accept", "text/plain" )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact.putheader( "Host", Host )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact.endheaders()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact.send( Args )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reply, Message, Headers = Contact.getreply()</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strOutput = Contact.getfile().read()</DIV>
<DIV>&nbsp;</DIV>
<DIV>This is response we got from the server:</DIV>
<DIV>&nbsp;</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&amp;retry=&amp;disable_cookie_login__=1">http://2ksvr:85/require_login?came_from=http%3A//2ksvr%3A85/cvs/custom_report/index_html&amp;retry=&amp;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&amp;retry=&amp;disable_cookie_login__=1">http://2ksvr:85/require_login?came_from=http%3A//2ksvr%3A85/cvs/custom_report/index_html&amp;retry=&amp;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>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ruben Montejano.</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>