Curl不会解压缩deflate页面

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

出于某种原因,即使设置了Content-Encoding: deflate标头,Curl版本的Curl也不会解压缩我的页面。浏览器可以很好地打开文件。 wget还解压缩输出。我记得它在前一段时间工作。 Curl不对压缩后的流进行解压缩的原因可能是什么?

$curl app.pitchinvestorslive.com/env.js -i
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 401
Content-Type: text/javascript
Cache-Control: max-age=60
Content-Encoding: deflate
Date: Mon, 14 Oct 2019 14:04:17 GMT
Connection: keep-alive

�(��LY[^T����}L�s�hcyn��w͎*)��ӦԢ�L�k�x��l_c���

$ curl --version
curl 7.64.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.8.6/openssl/zlib nghttp2/1.36.0 librtmp/2.3
Release-Date: 2019-02-06
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL 

curl deflate
1个回答
0
投票

如果设置了--compressed标志,Curl将自动解压缩响应

curl --compressed app.pitchinvestorslive.com/env.js -i 
© www.soinside.com 2019 - 2024. All rights reserved.