Instagram是否因速率限制和/或某种形式的请求过滤而返回HTTP 500响应?

Jon*_*ram 9 internal-server-error instagram

我正在开发一种用于检查网页中链接完整性的工具.

我注意到,如果有人在浏览器中访问给定的URL,那么各种Instagram URL将返回HTTP 500响应,并且会得到伴随预期资源的HTTP 200响应.

这是在请求常规Instagram URL时,就像浏览器用户那样,而不是在使用REST API时.

使用cURL的典型请求/响应:

curl -v http://instagram.com/p/YKTkxHBA-P/
* About to connect() to instagram.com port 80 (#0)
*   Trying 54.225.159.246... connected
> GET /p/YKTkxHBA-P/ HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: instagram.com
> Accept: */*
> 
< HTTP/1.1 500 Server Error
< Cache-Control: no-cache
< Content-Type: text/html
< Date: Tue, 15 Oct 2013 08:31:09 GMT
< Server: nginx
< Content-Length: 87
< Connection: keep-alive
< 
<html><body><h1>500 Server Error</h1>
An internal server error occured.
</body></html>
* Connection #0 to host instagram.com left intact
* Closing connection #0
Run Code Online (Sandbox Code Playgroud)

在这种情况下我做了一段时间得到HTTP 200响应,但现在我一直得到HTTP 500响应.

这一切都是针对特定主机的; 这些URL,即使使用cURL发送请求,也会返回来自其他计算机的HTTP 200响应.

由于这是特定于主机发送请求我怀疑一种速率限制或IP请求过滤的形式,但我没有找到任何文件的效果.

由于给定的IP被拒绝访问,Instagram是否会正式返回上述HTTP 500响应?

Kim*_*Kim -2

我几乎 100% 确定会发生这种情况,因为 Instagram API 阻止了域名/IP 地址。

原因:

  1. 用于在浏览器中获取 JSON。无法从 Web 服务获取 cURL。
  2. 我将我的应用程序从我的主域(如果该应用程序不起作用)复制到另一个域。相同的应用程序有效。

奇怪的是,您收到的是“500 内部错误”,而不是“您的 IP 已被阻止”的消息。