This commit is contained in:
Sterling Hughes 2002-07-03 11:50:00 +00:00
parent b3e562f9ef
commit 51e5a578b7

View File

@ -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);