Quantcast
Channel: Chilkat Forum - latest questions
Viewing all articles
Browse latest Browse all 1061

BUG: CkRest cannot decode gzip response

$
0
0
CkRest rest;
CkString output;

rest.Connect("www.google.com", 443, true, false);
rest.AddHeader("Accept-Encoding", "gzip");
rest.SendReqNoBody("GET", "/about/")
rest.get_ResponseHeader(output);
rest.ReadRespBodyString(output); // <------ this fails

CkRest works if I try to use deflate instead of gzip.

LastErrorText:

ChilkatLog:
  ReadRespBodyString:
    DllDate: Jan  6 2017
    ChilkatVersion: 9.5.0.66
    Architecture: Little Endian; 32-bit
    Language: Visual C++ 2015 (32-bit)
    VerboseLogging: 0
    readResponseBody:
      readChunkedResponseBody:
        consumeGzipHeader:
          Failed to read 1st 10 bytes.
        --consumeGzipHeader
        Failed to read response body chunk.
      --readChunkedResponseBody
    --readResponseBody
    Failed.
  --ReadRespBodyString
--ChilkatLog

Same thing works with no issues for CkHttp:

CkHttp http;
CkString output;

http.put_AllowGzip(true);
http.QuickGetStr("https://www.google.com/about/", output)

Viewing all articles
Browse latest Browse all 1061

Trending Articles