question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rpc breaks on `Transfer-Encoding: chunked`

See original GitHub issue

trufflesuite/ganache:v7.0.2

# network host just for convenience...
docker run -it --rm --network host trufflesuite/ganache:v7.0.2 
# not chunked - OK
curl -vv http://localhost:8545 -H "Content-Type: application/json" --data '{"id":0,"jsonrpc":"2.0","method":"eth_accounts"}'    
*   Trying 127.0.0.1:8545...
* Connected to localhost (127.0.0.1) port 8545 (#0)
> POST / HTTP/1.1
> Host: localhost:8545
> User-Agent: curl/7.80.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 48
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200
< Content-Type: application/json
< Content-Length: 485
< 
* Connection #0 to host localhost left intact
{"id":0,"jsonrpc":"2.0","result":["0x157609c1d4adbfa016b3e2e89d6948c262c55f04","0x5250d86009692dc42901f42a431e6cd619c6bb40","0x4600010d0c9bf5054882839695cf48e348e59734","0x1c874ee0c60b979d65aa2d4e2a5b369463c09804","0x91f3bff1eb3ed88a9b3978ec02ccaa393a0fba05","0x37d2cd0ac2d9e5ec3535baab860037b82d6325e9","0xf1bc0e8a716e106dd0856ee7543ab152ce83d1e4","0xcdfea7d950446c415bd66bcce7079ddc664577e2","0x90261a5cf492debd03ce1390aaabaadace4741ec","0x9ba760a678ef0e24f25f4804a08424cb8ea262aa"]}
# chunked - BAD
curl -vv http://localhost:8545 -H "Content-Type: application/json" -H "Transfer-Encoding: chunked" --data '{"id":0,"jsonrpc":"2.0","method":"eth_accounts"}'    
*   Trying 127.0.0.1:8545...
* Connected to localhost (127.0.0.1) port 8545 (#0)
> POST / HTTP/1.1
> Host: localhost:8545
> User-Agent: curl/7.80.0
> Accept: */*
> Content-Type: application/json
> Transfer-Encoding: chunked
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 400
< Content-Type: text/plain
< Content-Length: 45
< 
* Connection #0 to host localhost left intact
400 Bad Request: Unexpected end of JSON input

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
uNetworkingABcommented, Oct 8, 2022

Fixed, will be part of next release

1reaction
uNetworkingABcommented, Oct 6, 2022

I’m planning on fixing this. Did not know anyone wanted it fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Downloads fail when Transfer-Encoding = chunked · Issue #113
Setup server environment where files will be served with Transfer-Encoding = chunked; Try downloading file using android app ...
Read more >
Are the chunk sizes in an HTTP response with "Transfer ...
The response could have easily been chopped up into chunks of sizes different from 23 and 1A. Is there a case where chunk...
Read more >
Apache HTTP Server Chunked Encoding - GIAC Certifications
1 EXECUTIVE SUMMARY. The purpose of this paper is to explain the basics of the Apache Chunked. Encoding Exploit, how the exploit works, ......
Read more >
Support for `Transfer-Encoding: chunked` - GitLab.org
people say that GitLab doesn't support Transfer-Encoding: chunked . Steps to reproduce. I haven't tried to reproduce, but it should be possible ...
Read more >
Transfer-Encoding - HTTP - MDN Web Docs
Chunked encoding is useful when larger amounts of data are sent to the client and the total size of the response may not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found