mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:33:42 +03:00
- Based on Fedor Karpelevitch's formpost path basename patch, file parts in
formposts no longer include the path part. If you _really_ want them, you must provide your preferred full file name with CURLFORM_FILENAME. Added detection for libgen.h and basename() to configure. My custom basename() replacement function for systems without it, might be a bit too naive... Updated 6 test cases to make them work with the stripped paths.
This commit is contained in:
parent
be1cece69b
commit
8e87223195
10 changed files with 103 additions and 15 deletions
|
|
@ -37,12 +37,12 @@ User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6
|
|||
Host: 127.0.0.1:%HTTPPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
Content-Length: 227
|
||||
Content-Length: 223
|
||||
Expect: 100-continue
|
||||
Content-Type: multipart/form-data; boundary=----------------------------b0b3d6d23991
|
||||
|
||||
------------------------------b0b3d6d23991
|
||||
Content-Disposition: form-data; name="name"; filename="log/fie ld 166"
|
||||
Content-Disposition: form-data; name="name"; filename="fie ld 166"
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
data inside the file
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 z
|
|||
Host: 127.0.0.1:%HTTPSPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
Content-Length: 1390
|
||||
Content-Length: 1386
|
||||
Expect: 100-continue
|
||||
Content-Type: multipart/form-data; boundary=----------------------------c3b2ef7f0bb8
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ Content-Disposition: form-data; name="tool"
|
|||
|
||||
curl
|
||||
------------------------------c3b2ef7f0bb8
|
||||
Content-Disposition: form-data; name="file"; filename="log/test304.txt"
|
||||
Content-Disposition: form-data; name="file"; filename="test304.txt"
|
||||
Content-Type: text/plain
|
||||
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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 OpenSSL/0.9.7a ipv6 z
|
|||
Host: 127.0.0.1:%HTTPPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
Content-Length: 598
|
||||
Content-Length: 594
|
||||
Expect: 100-continue
|
||||
Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ bar
|
|||
foo
|
||||
|
||||
------------------------------24e78000bd32
|
||||
Content-Disposition: form-data; name="file2"; filename="log/test39.txt"
|
||||
Content-Disposition: form-data; name="file2"; filename="test39.txt"
|
||||
Content-Type: text/plain
|
||||
|
||||
foo bar
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 z
|
|||
Host: 127.0.0.1:%HTTPPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
Content-Length: 412
|
||||
Content-Length: 408
|
||||
Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
|
||||
|
||||
------------------------------7c633d5c27ce
|
||||
|
|
@ -52,7 +52,7 @@ Content-Disposition: form-data; name="tool"
|
|||
|
||||
curl
|
||||
------------------------------7c633d5c27ce
|
||||
Content-Disposition: form-data; name="file"; filename="log/test44.txt"
|
||||
Content-Disposition: form-data; name="file"; filename="test44.txt"
|
||||
Content-Type: text/plain
|
||||
|
||||
foo-
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 z
|
|||
Host: 127.0.0.1:%HTTPPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
Content-Length: 412
|
||||
Content-Length: 408
|
||||
Expect: 100-continue
|
||||
Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ Content-Disposition: form-data; name="tool"
|
|||
|
||||
curl
|
||||
------------------------------9ef8d6205763
|
||||
Content-Disposition: form-data; name="file"; filename="log/test71.txt"
|
||||
Content-Disposition: form-data; name="file"; filename="test71.txt"
|
||||
Content-Type: text/plain
|
||||
|
||||
foo-
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 z
|
|||
Host: 127.0.0.1:%HTTPPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
Content-Length: 411
|
||||
Content-Length: 407
|
||||
Expect: 100-continue
|
||||
Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ Content-Disposition: form-data; name="tool"
|
|||
|
||||
curl
|
||||
------------------------------9ef8d6205763
|
||||
Content-Disposition: form-data; name="file"; filename="log/test9.txt"
|
||||
Content-Disposition: form-data; name="file"; filename="test9.txt"
|
||||
Content-Type: text/plain
|
||||
|
||||
foo-
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue