Skip to content

Remove size limit in RPC client, keep it in server#4640

Merged
laanwj merged 2 commits intobitcoin:masterfrom
laanwj:2014_07_rpc_request_size
Aug 7, 2014
Merged

Remove size limit in RPC client, keep it in server#4640
laanwj merged 2 commits intobitcoin:masterfrom
laanwj:2014_07_rpc_request_size

Conversation

@laanwj
Copy link
Copy Markdown
Member

@laanwj laanwj commented Aug 6, 2014

The size limit makes a lot of sense for the server, as it never has to accept very large data and has to protect against malicious clients.

The client, however, can request arbitrary amounts of data (for example with listtransactions on a large wallet). Having a strict size limit makes little sense.

Fixes #4604.

The second commit contains a slight optimization that prevents a redundent copy and removes a needless c_str which would mess with binary data.

laanwj added 2 commits August 6, 2014 13:01
Split up HTTPReply into HTTPReply and HTTPReplyHeader, so that
the message data can be streamed directly.

Also removes a c_str(), which would have prevented binary
output with NUL characters in it.
The size limit makes a lot of sense for the server, as it never has to
accept very large data.

The client, however, can request arbitrary amounts of data with
`listtransactions` on a large wallet.

Fixes bitcoin#4604.
@BitcoinPullTester
Copy link
Copy Markdown

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4640_733177ebd3ecf3a03c2acb6b244c8b3d1b4a3981/ for binaries and test log.
This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/
Contact BlueMatt on freenode if something looks broken.

@Joukehofman
Copy link
Copy Markdown

This pr indeed solves the issue I had at #4604
Thanks!

@gavinandresen
Copy link
Copy Markdown
Contributor

Untested ACK, looks good.

@laanwj laanwj merged commit 733177e into bitcoin:master Aug 7, 2014
laanwj added a commit that referenced this pull request Aug 7, 2014
733177e Remove size limit in RPC client, keep it in server (Wladimir J. van der Laan)
e17151a Avoid a copy in RPC output (Wladimir J. van der Laan)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

listtransactions "*" 150000 on big wallet timeout?

4 participants