带有 curl 的简单 GET 请求返回空主体(Content-Length:0):
curl -v https://www.flyorientthai.com/booking/en/index.php
另一方面,wget 可以很好地处理该 url:
wget https://www.flyorientthai.com/booking/en/index.php
curl 有什么问题?
最佳答案
原来 'Connection: Keep-Alive'
header 是必需的。它默认添加到 wget 请求而不是 curl。
关于linux - 使用 curl 获取请求。没有错误,但 Content-Length 等于 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30413082/