redirect to a https server sending post parameters
Hi to everyone, I'm building an e-commerce website using zope and I've come to a problem I don't know how to solve. I'm trying to make a redirect to the bank server from a python external method but the page which I'm trying to redirect only accepts parameters sent using a post method. Doing a little of research I've found out a very close solution at http://mail.zope.org/pipermail/zope/2003-March/132569.html using M2Crypto and urllib. The problem is I need to do a redirect insted of returning the bank's page as if I was serving it. Does anyone know how to do this? Any help would be greatly appreciated as I'm really stuck. Thanks a lot in advance, Toni.
--On Sonntag, 16. Januar 2005 19:04 Uhr +0100 Tvicens <toni_vicens@terra.es> wrote:
The problem is I need to do a redirect insted of returning the bank's page as if I was serving it.
Your problem description is somewhat weird. Redirection means that you use RESPONSE.redirect() which will generate a HTTP Location: header. So what do you need? A redirection or resubmission of the data to some other URL? -aj
Tvicens wrote at 2005-1-16 19:04 +0100:
I'm building an e-commerce website using zope and I've come to a problem I don't know how to solve.
I'm trying to make a redirect to the bank server from a python external method but the page which I'm trying to redirect only accepts parameters sent using a post method.
HTTP 1.1 explicitely forbids HTTP compatible clients to redirect a POST request without explicit interaction with the user. Current browsers do not support a redirected POST at all. Thus, you proably do not want to use "redirect". Instead, you could use "urllib2" (maybe "ZPublisher.Client") to send your "POST" and return back the result to your client. Your application behaves in this case as a proxy.
... The problem is I need to do a redirect insted of returning the bank's page as if I was serving it.
I see no chance for you. Why do you need a redirect? Why can you not behave as a proxy? -- Dieter
participants (3)
-
Andreas Jung -
Dieter Maurer -
Tvicens