HTML5技术

分块编码(Transfer-Encoding: chunked) - 妙音天女

字号+ 作者:H5之家 来源:H5之家 2017-03-30 08:01 我要评论( )

参考链接: HTTP 协议中的 Transfer-Encoding 分块传输编码 一、背景: 二、分块编码(Transfer-Encoding: chunked) 具体方法 例: HTTP/1.1 200 OK Content-Type: text/plain Transfer-Encoding: chunked 25\r\n This is the data in the first chunk\r\n

参考链接:

HTTP 协议中的 Transfer-Encoding

分块传输编码

   

一、背景:

   

二、分块编码(Transfer-Encoding: chunked)

  • 具体方法

  • 例:

    HTTP/1.1 200 OK
    Content-Type: text/plain
    Transfer-Encoding: chunked

       

    25\r\n
    This is the data in the first chunk\r\n

       

    1C\r\n
    and this is the second one\r\n

       

    3\r\n

    con\r\n

       

    8\r\n
    sequence\r\n

       

    0\r\n

    \r\n

       

  • Content-Encoding 和 Transfer-Encoding 二者经常会结合来用,其实就是针对 Transfer-Encoding 的分块再进行 Content-Encoding压缩

     

    1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

    相关文章
    • URL编码参考手册 - 妙音天女

      URL编码参考手册 - 妙音天女

      2017-03-26 18:01

    • sublime text 3 修改文件保存编码 - 刘江龙

      sublime text 3 修改文件保存编码 - 刘江龙

      2016-04-15 12:00

    • HTML5标准学习 - 编码 - jerrylsxu

      HTML5标准学习 - 编码 - jerrylsxu

      2016-03-27 16:01

    • html5网页编码 - jerrylsxu

      html5网页编码 - jerrylsxu

      2016-03-15 18:00

    网友点评
    i