summaryrefslogtreecommitdiff
path: root/ext/curl
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2002-07-03 11:50:00 +0000
committerSterling Hughes <sterling@php.net>2002-07-03 11:50:00 +0000
commit51e5a578b77ed196eaa9ed8fea1e4f71927e19ad (patch)
tree3758c49f19bd891c89ab0277367bcfe6f335bff4 /ext/curl
parentb3e562f9ef44b5e32d188a1c585f2f8e19cb4ff3 (diff)
downloadphp-git-51e5a578b77ed196eaa9ed8fea1e4f71927e19ad.tar.gz
fix bug #17963
Diffstat (limited to 'ext/curl')
-rw-r--r--ext/curl/curl.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/curl/curl.c b/ext/curl/curl.c
index 6b004a6cdc..f17bbedad0 100644
--- a/ext/curl/curl.c
+++ b/ext/curl/curl.c
@@ -786,11 +786,17 @@ PHP_FUNCTION(curl_setopt)
postval = Z_STRVAL_PP(current);
if (*postval == '@') {
- error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key,
- CURLFORM_FILE, ++postval, CURLFORM_END);
+ error = curl_formadd(&first,
+ &last,
+ CURLFORM_COPYNAME, string_key,
+ CURLFORM_NAMELENGTH, string_key_len,
+ CURLFORM_FILE, ++postval,
+ CURLFORM_END);
}
else {
- error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key,
+ error = curl_formadd(&first, &last,
+ CURLFORM_COPYNAME, string_key,
+ CURLFORM_NAMELENGTH, string_key_len,
CURLFORM_PTRCONTENTS, postval,
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
CURLFORM_END);