Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Tianpu
V2EX  ›  Linux

Curl wget 会自动解压缩gzip压缩,怎么才可以得到原始文档?

  •  
  •   Tianpu · Jan 30, 2013 via iPhone · 8805 views
    This topic created in 4877 days ago, the information mentioned may be changed or developed.
    前端A节点使用Nginx的proxy cache加速后端B节点

    A B 都使用了Gzip 所以我想确定没有多次压缩
    Supplement 1  ·  Jan 30, 2013
    curl -H可以发送自定义header,感谢binux,看文档不仔细,大家要引以为戒
    2 replies    1970-01-01 08:00:00 +08:00
    binux
        1
    binux  
       Jan 30, 2013   ❤️ 1
    我怎么不知道curl和wget会自动解压gzip?
    curl -H 'Accept-Encoding:gzip' http://somewhere.com/
    Tianpu
        2
    Tianpu  
    OP
       Jan 30, 2013
    @binux 非常感谢

    >curl -H 'Accept-Encoding:gzip' www.domain.com > temp
    >gzip -d temp
    >cat temp

    一次解压后看到全是明文 是不是表示只经过一次压缩了?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1467 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 16:52 · PVG 00:52 · LAX 09:52 · JFK 12:52
    ♥ Do have faith in what you're doing.