我们正在使用隐形reCaptcha,偶尔,Google的Javascript代码向Google的服务器发出请求,收到响应状态410,而不是200.
由于Google的reCaptcha Javascript代码提出请求,我们无法控制它。
如果向用户提出了质询,则以下是失败请求的示例:
GET https://www.google.com/recaptcha/api2/payload?c=03AOPBWq_EYB...
响应是:
HTTP/1.1 410 Gone
<HTML>
<HEAD>
<TITLE>Gone</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Gone</H1>
<H2>Error 410</H2>
</BODY>
</HTML>
大约10%的时间失败了。以下是HTTP请求的“历史记录”:
请求#1
POST https://www.google.com/recaptcha/api2/reload?k=6LcqZCEU...
v:r20170515161201
reason:fi
bcr:[1943341955,-150...
...
HTTP/1.1 200 OK
content-type: application/json
...
)]}'
["rresp","03AOPBWq_EYBOYkGkn-1S...",null,600,["pmeta",null,null,null,
null,[[["TileSelectionStreetSign",null,3,4,4,null,null,[]
]
,["dress",null,3,4,4,null,null,[]
]
]
,[]
]
]
,"multicaptcha",null,
["bgdata","Ly93d3cuWk5rOHFMZDlvNDZFa..."]
]
上述回复看起来像无效的JSON,但预计会详细here
请求#2
GET https://www.google.com/recaptcha/api2/payload?c=03AOPBWq_EYBOYk...
...
HTTP/1.1 200 OK
content-type: image/jpeg
content-length: 50528
...
<JPEG>
请求#3
POST https://www.google.com/recaptcha/api2/replaceimage?k=6LcqZCEUAA...
v:r20170515161201
c:03AOPBWq_EYBOYkGkn-1SplFL...
ds:[[5,6,9,10,13,14]]
HTTP/1.1 200 OK
content-type: application/json
...
)]}'
["dresp","03AOPBWq-Iyck5GCpx86hk57XSxF-9b4GMaDeujP...",[]
,null,[]
]
请求#4(失败者)
GET https://www.google.com/recaptcha/api2/payload?c=03AOPBWq_EYBOYk...
...
HTTP/1.1 410 Gone
content-type: text/html
...
<HTML>
<HEAD>
<TITLE>Gone</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Gone</H1>
<H2>Error 410</H2>
</BODY>
</HTML>
答案 0 :(得分:1)
这基本上是因为会话已过期。如果您收到错误410 (即未成功并且您仍希望上传文件),则必须开始新会话。请查看以下链接了解详情: https://tools.ietf.org/html/rfc7231#section-6.5.9
答案 1 :(得分:0)
您的电话是 GET
。你需要POST
参考:https://www.google.com/recaptcha/api2/payload?c=03AOPBWq_EYB.。