mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:13:38 +03:00
curl/var: change byte offset syntax for assignments
Follow-up to 40c264db61 after discussions on IRC.
The new style is
name[0-99]=contents
and
name[0-99]@filename
A) This does not cause the same problems with old curl versions trying
the new syntax as this way will cause old curls just fail with syntax
error and not risk using the wrong file.
B) Adds the same byte range support for "normal" assigns, which the
previous syntax did not. Thus lets a user get a partial content of a
variable etc.
Added test 790 and 791 to verify non-file assigns with ranges.
Closes #15862
This commit is contained in:
parent
e7b90dadb2
commit
c2d37463b9
11 changed files with 167 additions and 42 deletions
|
|
@ -35,7 +35,7 @@ http
|
|||
--variable with a file byte range, reading from stdin
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --variable name"@-;[5-15]" --expand-data '{{name}}'
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --variable "name[5-15]@-" --expand-data '{{name}}'
|
||||
</command>
|
||||
<stdin>
|
||||
On the first Monday of the month of April, 1625, the market town of Meung
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue