Kong / Kong/insomnia

Failed reading the chunked-encoded streamFailed reading the chunked-encoded stream

Open
#5,715 0 comments 0 reactions 0 assignees View on GitHub
A-networking B-bug N-investigation S-unverified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

```
Unrecognized content encoding type. libcurl understands deflate, gzip, br content encodings.
Failed reading the chunked-encoded stream
```
It might be due to a handful of cases. I would suggest you double check your request headers:
- `Content-Encodin: UTF-8` where `Encodin` should probably be `Encoding`
- `Accept-Encoding: gzip, deflate, br` might work bettter with just `Accept-Encoding: gzip, deflate`
- `Accept: /` should probably be `Accept: */*`

_Originally posted by @filfreire in https://github.com/Kong/insomnia/issues/5711#issuecomment-1400056159_
```
Thanks.
I followed Your recommendations, but
the "Failed reading the chunked-encoded stream"
remains.

GET /nifi-api/templates/0f1ba51e-6bab-4836-8403-cf0c046800a5/download HTTP/1.1
Host: server1:58443
User-Agent: insomnia/2022.7.5
Cookie: __Secure-Request-Token=3e7a7893-a3b0-40d6-b668-ed637d50af72
Content-Encoding: UTF-8
Accept: */*
Accept-Encoding: gzip, deflate

TLSv1.2 (IN), TLS header, Supplemental data (23):
TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
TLSv1.2 (IN), TLS header, Supplemental data (23):
Mark bundle as not supporting multiuse

HTTP/1.1 200 OK
Date: Mon, 23 Jan 2023 21:47:45 GMT
Cache-Control: private, no-cache, no-store, no-transform
Content-Encoding: UTF-8
Content-Disposition: attachment; filename* = UTF-8''Base64EncodeContent.xml
Content-Type: application/xml
Vary: Accept-Encoding
Content-Security-Policy: frame-ancestors 'self'
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked

Received 15.5 KB chunk
Unrecognized content encoding type. libcurl understands deflate, gzip, br content encodings.
Failed reading the chunked-encoded stream
Closing connection 29
TLSv1.2 (IN), TLS header, Supplemental data (23):
TLSv1.2 (OUT), TLS header, Supplemental data (23):
TLSv1.3 (OUT), TLS alert, close notify (256):

PS.
Maybe this is important:
a client certificate is used for https authentication.

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named. Start by reproducing the reported download with the provided URL, response headers, and client-certificate setup, then trace the handling of the libcurl content-encoding and chunked-stream errors; done means the XML response downloads without the reported failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.