将其他域的发布请求发送给GAE

时间:2012-06-09 16:41:23

标签: python google-app-engine post

我在GAE上写了一个简单的python应用程序。

class Upload(webapp2.RequestHandler):
    def post(self):
        self.response.out.write('HelloWorld')

app = webapp2.WSGIApplication(['/upload', Upload)],
                              debug=True)

它可以收到邮寄请求。

但是有一些东西。


我写了一个测试页。

<html>
  <head></head>
  <body>
    <form action="http://localhost:8080/upload" method="POST">
      <input type="text" name="content"/>
      <input type="submit"  value="submit local"/>     
    </form>
    <form action="http://wp7-gps-tracker.appspot.com/upload" method="POST">
      <input type="text" name="content"/>
      <input type="submit"  value="submit server"/>     
    </form>
  </body>
</html>

结果

在localhost中运行:

使用IE测试:成功!

使用Chrome测试:成功!

上传到GAE:

使用IE测试:faild!

使用Chrome测试:成功!

我的申请有什么问题?

我发现了问题!

GAE在中国是被禁止的!

我的Chrome正在使用代理,因此可以使用!

在你面前,中国政府!

2 个答案:

答案 0 :(得分:1)

尝试相对于您的环境更改操作... GAE对应用程序版本有不同的URL。

action="/upload" 

答案 1 :(得分:0)

尝试仅在测试页中使用1个表单,也许IE在区分提交哪个表单时存在问题