Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range (Start-Stop in bytes) for "--data-binary" option (feature request) #1200

ricary37 opened this issue Jan 9, 2017 · 2 comments


Copy link

ricary37 commented Jan 9, 2017

bagder, seems you didn't understand what I was trying to request in #1198 and closed the thread, so I will explain in other words.

I don't want curl to set headers for "--data-binary".
I'd like curl to send exact set of bytes to the server.
Technially it would be like:

If I add the option "--data-binary!1073741823-2147483647"
then curl does:
open(F, "");
seek(F, SEEK_SET, 1073741823);
read(F, $buf, 2147483647-1073741823+1);
send(SOCKET, $buf)

Copy link

bagder commented Jan 9, 2017

We don't keep feature requests open in the issue tracker, as they aren't really current issues. See for an explanation how we use the tracker. Unfortunately, we're drowning in good ideas and it is always easy to bring more of those. Turning them into working and good code is however not as easy.

My suggestion for the short to medium term would be to write a small script that

  1. creates an intermediary file on disk with the 1073741823-2147483647 content
  2. uploads that file (with whatever set of custom headers that are necessary)
  3. removes the file again

Copy link

ricary37 commented Jan 10, 2017

bagder, I've made my perl wrapper already :)
Could you please add this nice feature request in your long waiting/todo list.

I think my feature request will be the first step to fix RAM consumption as mentioned in #290
curl-master\src\tool_getparam.c: err = file2memory(&postdata, &size, file);

I hope somebody will help us with the code.

@bagder bagder closed this as completed in e3b9114 Jan 14, 2017
peterpih pushed a commit to railsnewbie257/curl that referenced this issue Jan 24, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

No branches or pull requests

2 participants