Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78088 > unrolled thread

Google Appengine Proxy Post method error

Started byalextrapp@googlemail.com
First post2014-09-19 14:11 -0700
Last post2014-09-23 07:22 +0100
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Google Appengine Proxy Post method error alextrapp@googlemail.com - 2014-09-19 14:11 -0700
    Re: Google Appengine Proxy Post method error Kev Dwyer <kevin.p.dwyer@gmail.com> - 2014-09-23 07:22 +0100

#78088 — Google Appengine Proxy Post method error

Fromalextrapp@googlemail.com
Date2014-09-19 14:11 -0700
SubjectGoogle Appengine Proxy Post method error
Message-ID<ce472ad7-aa3a-4446-9a46-96b1074fa68a@googlegroups.com>
So I got the Labnol Google Appengine proxy but it can't handle the Post method aka error 405.

I need help adding this method to the script:

mirror.py = http://pastebin.com/2zRsdi3U

transform_content.py = http://pastebin.com/Fw7FCncA

main.html = http://pastebin.com/HTBH3y5T

All other files are just small files for appengine that don't carry sufficient code for this. Hope you guys can help.

Thanks in advance :)

[toc] | [next] | [standalone]


#78194

FromKev Dwyer <kevin.p.dwyer@gmail.com>
Date2014-09-23 07:22 +0100
Message-ID<mailman.14243.1411453367.18130.python-list@python.org>
In reply to#78088
alextrapp@googlemail.com wrote:

> So I got the Labnol Google Appengine proxy but it can't handle the Post
> method aka error 405.
> 
> I need help adding this method to the script:
> 
> mirror.py = http://pastebin.com/2zRsdi3U
> 
> transform_content.py = http://pastebin.com/Fw7FCncA
> 
> main.html = http://pastebin.com/HTBH3y5T
> 
> All other files are just small files for appengine that don't carry
> sufficient code for this. Hope you guys can help.
> 
> Thanks in advance :)


Hello,

Very broadly speaking, you need to add a post method to the MirrorHandler  
class, and in that method:

 - mung the request in a similar fashion to the get method
 - avoid caching the request (POST requests are not idempotent)
 - forward the altered request to the destination server
 - return the response to the original client


The labnol google-proxy githubpage lists a twitter account for support 
contact - http://twitter.com/labnol - so you could try asking there for more 
help.  Also check the docs for webapp2 and and Google App Engine 
(http://developers.google.com/appengine).  

Have fun,

Kev 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web