V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
n121
V2EX  ›  分享发现

Chrome 下载 tar.gz 大小异常(被解压)

  •  
  •   n121 · 2019-03-22 11:48:57 +08:00 · 1800 次点击
    这是一个创建于 1855 天前的主题,其中的信息可能已经有所发展或是发生改变。

    http://erlang.org/download/otp_doc_html_21.3.tar.gz

    用 Chrome 下载,得到 177M otp_doc_html_21.3.tar.gz

    curl -I http://erlang.org/download/otp_doc_html_21.3.tar.gz
    
    HTTP/1.1 200 OK
    Date: Fri, 22 Mar 2019 03:28:30 GMT
    Server: Apache/1.3.42 (Unix)
    Last-Modified: Tue, 12 Mar 2019 12:04:41 GMT
    ETag: "22251e-1f898aa-5c87a059"
    Accept-Ranges: bytes
    Content-Length: 33069226
    Content-Type: application/x-tar
    Content-Encoding: x-gzip
    

    直接 curl 下载,gzip -d 对比了一下 sha256sum,应该是 Content-Type 设置不对,Chrome 识别为 tar 文件,碰巧是 gz 压缩,所以直接解压了。

    find . -name '*tar.gz' -exec gzip -t {} \;

    2 条回复    2019-03-22 12:19:48 +08:00
    Ziya
        1
    Ziya  
       2019-03-22 11:54:07 +08:00
    确实,Chrome 73 下载回来的直接就是 otp_doc_html_21.3.tar 了
    cxh116
        2
    cxh116  
       2019-03-22 12:19:48 +08:00
    提 Bug 给 erlang 官网,让他们设置一下 Web 服务的 mime type .
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1777 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:27 · PVG 00:27 · LAX 09:27 · JFK 12:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.