ERR_INVALID_CHUNKED_ENCODING means the response could not be decoded as a complete chunked message. Some content arriving successfully does not establish that the rest of the response was valid.

  1. Keep the response headers and the first decoder error. Establish which component reported it and whether the message was declared chunked.
  2. Locate the stopping point. HTTP/1.1 chunked coding requires sizes, the corresponding data, delimiters and a terminating chunk, with trailers where applicable. An early connection close and a malformed size are different leads.
  3. Compare the same controlled request on the intended route. Match the request with proxy and upstream logs. Look for an upstream close, an intermediary transformation or application cancellation at that point.

Do not infer HTTP framing from a TCP buffer size. One socket read may contain half a chunk or several chunks; a library may then expose decoded content in different buffers. A JSON record has yet another boundary. A proxy can reframe a response without preserving the original packet boundaries.

If the evidence points to an old Squid implementation, keep its release number with that conclusion. Squid 2.x patch advice does not describe every current release. Preserve normal decoding and certificate validation during comparison: suppressing the error can leave an incomplete file looking like a successful download.

Mikanda mikatakata