]> git.ipfire.org Git - thirdparty/curl.git/commit
curl: add byte range support to --variable reading from file
authorDaniel Stenberg <daniel@haxx.se>
Sat, 21 Dec 2024 10:46:27 +0000 (11:46 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 21 Dec 2024 10:46:27 +0000 (11:46 +0100)
commit40c264db617d025ca5053bc0964a185d11101301
tree24ce0866e8d3ef5be924555a6ee40c7681ba6a6d
parentfc3e1cbc508f70f3dc21c2d55e5e2fa294f771cb
curl: add byte range support to --variable reading from file

Allowing --variable read a portion of provided files, makes curl work on
partial files for any options that accepts strings. Like --data and others.

The byte offset is provided within brackets, with a semicolon separator
like: --variable name@file;[100-200]"

Inspired by #14479
Assisted-by: Manuel Einfalt
Test 784 - 789. Documentation update provided.

Closes #15739
13 files changed:
docs/cmdline-opts/variable.md
src/tool_getparam.h
src/tool_helpers.c
src/tool_paramhlp.c
src/tool_paramhlp.h
src/var.c
tests/data/Makefile.am
tests/data/test784 [new file with mode: 0644]
tests/data/test785 [new file with mode: 0644]
tests/data/test786 [new file with mode: 0644]
tests/data/test787 [new file with mode: 0644]
tests/data/test788 [new file with mode: 0644]
tests/data/test789 [new file with mode: 0644]