server sometimes returns chunked transfer encoding

前端 未结 3 1246
旧时难觅i
旧时难觅i 2020-12-20 03:23

I\'m building a REST API.. Sometimes the server returns the response with chunked transfer encoding? Why is that?!

Why can\'t the server always return the response in

3条回答
  •  无人及你
    2020-12-20 04:03

    A problem may be that Apache is gzipping your download, taking care of correcting the Content-Length, or in your case, adding the header

    Content-Encoding: chunked

    You can add a .htaccess RewriteRule to disable gzip:

    RewriteRule . - [E=no-gzip:1]
    

提交回复
热议问题