mirror of
https://github.com/curl/curl.git
synced 2026-08-25 23:03:39 +03:00
cli tool: reimplement stdin buffering in -F option.
If stdin is not a regular file, its content is memory-buffered to enable a possible data "rewind". In all cases, stdin data size is determined before real use to avoid having an unknown part's size. --libcurl generated code is left as an unbuffered stdin fread/fseek callback part with unknown data size. Buffering is not supported in deprecated curl_formadd() API.
This commit is contained in:
parent
f64c05278e
commit
665b3e48bc
3 changed files with 153 additions and 14 deletions
|
|
@ -53,11 +53,9 @@ POST /we/want/173 HTTP/1.1
|
|||
User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
Accept: */*
|
||||
Transfer-Encoding: chunked
|
||||
Expect: 100-continue
|
||||
Content-Length: 360
|
||||
Content-Type: multipart/form-data; boundary=----------------------------5dbea401cd8c
|
||||
|
||||
168
|
||||
------------------------------5dbea401cd8c
|
||||
Content-Disposition: form-data; name="field1"
|
||||
|
||||
|
|
@ -76,9 +74,6 @@ line7
|
|||
line8
|
||||
|
||||
------------------------------5dbea401cd8c--
|
||||
|
||||
0
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue