我尝试从我的
卷曲后得到以下500个回复# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
服务器。
# curl -vvv -L soundcloud.com
* Rebuilt URL to: soundcloud.com/
* Trying 72.21.91.127...
* Connected to soundcloud.com (72.21.91.127) port 80 (#0)
> GET / HTTP/1.1
> Host: soundcloud.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Cache-Control: no-cache
< Content-Type: text/html
< Date: Sat, 01 Oct 2016 05:03:52 GMT
< Server: am/2
< Content-Length: 87
<
<html><body><h1>500 Server Error</h1>
An internal server error occured.
</body></html>
* Connection #0 to host soundcloud.com left intact
什么是神秘的是几天前工作。 github.com的卷曲返回200,所以我不认为我的网络连接存在问题。在发布此问题之前,我刚刚完成了sudo apt-get update && sudo apt-get upgrade
。在我的笔记本电脑上,相同的请求会返回200.如果我受到速率限制,我应该回到429.我很困惑我的服务器上发生了什么。有什么我可以调试的吗?我完全错过了什么吗?
更新:使用代理curl -vvv -L --proxy <random_http_proxy>:3128 http://soundcloud.com
会回复200.我很困惑。
更新2:使用https://不提供帮助
root@cap:~# curl -vvv -L https://soundcloud.com
* Rebuilt URL to: https://soundcloud.com/
* Trying 72.21.91.127...
* Connected to soundcloud.com (72.21.91.127) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* found 692 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
* server certificate verification OK
* server certificate status verification SKIPPED
* common name: *.soundcloud.com (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: OU=Domain Control Validated,CN=*.soundcloud.com
* start date: Wed, 10 Feb 2016 10:19:25 GMT
* expire date: Wed, 09 May 2018 10:08:48 GMT
* issuer: C=BE,O=GlobalSign nv-sa,CN=GlobalSign Domain Validation CA - SHA256 - G2
* compression: NULL
* ALPN, server accepted to use http/1.1
> GET / HTTP/1.1
> Host: soundcloud.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Cache-Control: no-cache
< Content-Type: text/html
< Date: Sun, 09 Oct 2016 20:58:53 GMT
< Server: am/2
< Content-Length: 87
<
<html><body><h1>500 Server Error</h1>
An internal server error occured.
</body></html>
* Connection #0 to host soundcloud.com left intact
这个问题只是神奇地修复了它自己突然刚刚开始工作的意义上。我确实向soundcloud.com发送了支持请求,问题在第二天就消失了。我没有得到回复,他们确实采取了任何行动,例如将我的IP地址列入白名单,但我会假设这就是发生的事情。
答案 0 :(得分:0)
尝试添加协议前缀https://
curl -vvv -L https://soundcloud.com
我不熟悉命令行选项。
当我使用PHP curl这些选项时,它起作用了。
CURLOPT_SSL_VERIFYPEER, FALSE
CURLOPT_RETURNTRANSFER, TRUE
CURLOPT_FOLLOWLOCATION, TRUE
所需的关键选项是CURLOPT_SSL_VERIFYPEER, FALSE
仅http://
而非https://
返回400 Bad Request而不是500
通过添加看起来就像浏览器请求的请求标头,我能够获得200个HTTP响应代码,但页面是使用JavaScript创建的。所以页面上写着“JavaScript已被禁用......”