[Zope] Accessing httplib from a Zope Python script
Dylan Reinhardt
zope@dylanreinhardt.com
27 Mar 2003 09:21:57 +0000
On Thu, 2003-03-27 at 15:50, Sean Winstead wrote:
> Then I receive the following error when posting to the page:
>
> Error Type: Unauthorized
> Error Value: You are not allowed to access HTTP in this context
>
Ignore the issues with your script. Your *real* problem is that PayPal
won't accept HTTP for this connection, you must use HTTPS.
Posting HTTPS from Zope is a bit more difficult, given that vanilla
Python 2.1 doesn't support SSL. What you want is a library called
M2Crypto. If you're on Windoze, you're in luck, b/c there are binaries
available... but if you're on Linux, you've got some compiling to do.
(You'll need SWIG set up before you can compile M2Crypto.)
See: http://www.zope.org/Members/dylanr/secure_post for hints on how to
proceed once you've got M2Crypto in place.
HTH,
Dylan