为什么浏览器可以成功检索网页,但curl却不能?

问题描述 投票:0回答:1

我可以在浏览器中成功访问https://archive.li/9E2KE。但是当我通过curl请求该站点时,请求超时。这是为什么?还有可以修复吗?

我正在运行的curl请求来自浏览器的网络选项卡,使用

copy as curl

curl 'https://archive.li/9E2KE' --compressed \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' \
-H 'Accept-Language: en-US,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Referer: https://archive.li/wikipedia.org' \
-H 'DNT: 1' -H 'Connection: keep-alive' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' \
-H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-User: ?1' -H 'TE: trailers'

curl: (92) HTTP/2 stream 1 was not closed cleanly before end of the underlying stream

http curl
1个回答
0
投票

https://archive.li/9E2KE已关闭,无法测试并帮助您。

© www.soinside.com 2019 - 2024. All rights reserved.