LiteSpeed not returning Content-Encoding header for Range requests, breaks gzip

Discussion in 'Bug Reports' started by Sean Kinsey, Aug 1, 2014.

  1. Sean Kinsey

    Sean Kinsey New Member

    When combining `Accept-Encoding: deflate, gzip` and `Range: bytes=0-524281` as request headers, the response, both gzipped and limited to the range, is returned with a missing `Content-Encoding` header.
    This causes Curl and other clients to fail to decode the response.

    oyvind-mbp:~ oyvind$ curl -v -A "facebookexternalhit/1.1 (+" -H "Range: bytes=0-524281" --compressed ""
    * Adding handle: conn: 0x7fe42c003a00
    * Adding handle: send: 0
    * Adding handle: recv: 0
    * Curl_addHandleToPipeline: length: 1
    * - Conn 0 (0x7fe42c003a00) send_pipe: 1, recv_pipe: 0
    * About to connect() to port 80 (#0)
    *   Trying
    * Connected to ( port 80 (#0)
    > GET / HTTP/1.1
    > User-Agent: facebookexternalhit/1.1 (+
    > Host:
    > Accept: */*
    > Accept-Encoding: deflate, gzip
    > Range: bytes=0-524281
    < HTTP/1.1 206 Partial Content
    < Date: Fri, 01 Aug 2014 04:50:32 GMT
    * Server LiteSpeed is not blacklisted
    < Server: LiteSpeed
    < Accept-Ranges: bytes
    < Connection: Keep-Alive
    < Keep-Alive: timeout=5, max=100
    < Last-Modified: Fri, 01 Aug 2014 04:48:10 GMT
    < Content-Type: text/html
    < X-Pingback:
    < Vary: Accept-Encoding, Cookie
    < Content-Range: bytes 0-26570/26571
    < Content-Length: 26571
    We have seen this with multiple LiteSpeed powered domains, and so believe this is related to LiteSpeed, or how it interacts with other proxy components.

    (referenced from
  2. mistwang

    mistwang LiteSpeed Staff

    For Range request handled by LiteSpeed Enterprise Web Server itself, gzip compression is turned off, in other words, LiteSpeed does not apply gzip compressed to range requests.

    If it was compressed, it must be done by something else.

    When I try your test case, the page is served by PHP directly, without responding to the range request.

Share This Page