dotj6816 2015-07-20 05:36
浏览 105

GAE GO Http调用,其Delete方法返回403(访问被拒绝)

I am having Google App Engine Go application. Recently I have noticed all HTTP DELETE calls are failing with 403 and an html page returned saying "Access Denied". The call is not going to the actual application the error seems to be returned by App Engine.

No error found in GAE logs.

This seems to be recent security changes in GAE causing this. But I don't find a way to enable DELETE method. All other methods GET, POST and PUT are working without any issue. I have searched GAE help but not able to find any information related to this issue.

Any idea how to enable DELETE method?

To make simpler I have created new sample app with following code. For any http call to "/" it returns "test"(by default it should return 200 OK).

package hello

import (
   "fmt"
   "net/http"
)

func init() {
   http.HandleFunc("/", handler)
}

func handler(w http.ResponseWriter, r *http.Request) {
  fmt.Fprint(w, "Test")
}

Now If call GET, PUT and POST it is successfully returning test with 200. For DELETE it is returning following html text with http error code 403.

<HTML>
<HEAD>
<TITLE>Access Denied</TITLE>
</HEAD>

<BODY BGCOLOR="white" FGCOLOR="black">
<H1>Access Denied</H1>
<HR>

<FONT FACE="Helvetica,Arial"><B>
 Description: You are not allowed to access the document you  requested.
</B></FONT>
<HR>
</BODY>

For local server DELETE method working fine and returning 200 OK with "test"

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 matlab中使用gurobi时报错
    • ¥15 WPF 大屏看板表格背景图片设置
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂