From 8e87223195bba350f7fab9575a3ea3de85a49166 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 1 Oct 2004 06:36:11 +0000 Subject: - 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. --- tests/data/test166 | 4 ++-- tests/data/test304 | 4 ++-- tests/data/test39 | 4 ++-- tests/data/test44 | 4 ++-- tests/data/test71 | 4 ++-- tests/data/test9 | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/data') diff --git a/tests/data/test166 b/tests/data/test166 index 07a0675ef..9a9704b0e 100644 --- a/tests/data/test166 +++ b/tests/data/test166 @@ -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 diff --git a/tests/data/test304 b/tests/data/test304 index 75751c2c0..8aaff245f 100644 --- a/tests/data/test304 +++ b/tests/data/test304 @@ -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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aaaaaaaaaa diff --git a/tests/data/test39 b/tests/data/test39 index 96b4661a2..15f9e9358 100644 --- a/tests/data/test39 +++ b/tests/data/test39 @@ -41,7 +41,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: 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 diff --git a/tests/data/test44 b/tests/data/test44 index dfd50250d..e858786da 100644 --- a/tests/data/test44 +++ b/tests/data/test44 @@ -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- diff --git a/tests/data/test71 b/tests/data/test71 index 5619d5e88..e18917b95 100644 --- a/tests/data/test71 +++ b/tests/data/test71 @@ -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- diff --git a/tests/data/test9 b/tests/data/test9 index f94b24174..370137065 100644 --- a/tests/data/test9 +++ b/tests/data/test9 @@ -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- -- cgit v1.2.3