/* file data */
FOREACH_HASH_VAL(files, data) {
- CURLcode err;
zval **file, **type, **name;
- if ( SUCCESS == zend_hash_find(Z_ARRVAL_PP(data), "name", sizeof("name"), (void **) &name) &&
- SUCCESS == zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void **) &type) &&
- SUCCESS == zend_hash_find(Z_ARRVAL_PP(data), "file", sizeof("file"), (void **) &file)) {
- err = curl_formadd(&http_post_data[0], &http_post_data[1],
+
+ if ( SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "name", sizeof("name"), (void **) &name) ||
+ SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void **) &type) ||
+ SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "file", sizeof("file"), (void **) &file)) {
+ http_error(HE_NOTICE, HTTP_E_INVALID_PARAM, "Post file array entry misses either 'name', 'type' or 'file' entry");
+ } else {
+ CURLcode err = curl_formadd(&http_post_data[0], &http_post_data[1],
CURLFORM_COPYNAME, Z_STRVAL_PP(name),
CURLFORM_FILE, Z_STRVAL_PP(file),
CURLFORM_CONTENTTYPE, Z_STRVAL_PP(type),
curl_formfree(http_post_data[0]);
return FAILURE;
}
- } else {
- http_error(HE_NOTICE, HTTP_E_INVALID_PARAM, "Post file array entry misses either 'name', 'type' or 'file' entry");
}
}
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0"
+ xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>http</name>
+ <channel>pecl.php.net</channel>
+ <summary>Extended HTTP Support</summary>
+ <description><![CDATA[
+* Building absolute URIs
+* RFC compliant HTTP redirects
+* RFC compliant HTTP date handling
+* Parsing of HTTP headers and messages
+* Caching by "Last-Modified" and/or ETag
+ (with 'on the fly' option for ETag generation from buffered output)
+* Sending data/files/streams with (multiple) ranges support
+* Negotiating user preferred language/charset
+* Convenient request functionality built upon libcurl
+* PHP5 classes: HttpUtil, HttpResponse (PHP-5.1), HttpRequest, HttpRequestPool, HttpMessage
+]]></description>
+ <lead>
+ <name>Michael Wallner</name>
+ <user>mike</user>
+ <email>mike@php.net</email>
+ <active>yes</active>
+ </lead>
+ <date>2005-00-00</date>
+ <version>
+ <release>0.14.0dev</release>
+ <api>0.14.0</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes><![CDATA[
++ Added missing support for raw post data in HttpRequest
++ Added missing HttpMessage::setBody()
+]]></notes>
+ <contents>
+ <dir name="/">
+ <file role="doc" name="CREDITS"/>
+ <file role="doc" name="EXPERIMENTAL"/>
+ <file role="doc" name="KnownIssues.txt"/>
+ <file role="doc" name="docs/functions.html"/>
+ <file role="doc" name="docs/examples/Bandwidth_Throttling.php"/>
+ <file role="doc" name="docs/examples/Cached_Responses.php"/>
+ <file role="doc" name="docs/examples/GET_Queries.php"/>
+ <file role="doc" name="docs/examples/KISS_XMLRPC_Client.php"/>
+ <file role="doc" name="docs/examples/Multipart_Posts.php"/>
+ <file role="doc" name="docs/examples/Parallel_Requests.php"/>
+ <file role="doc" name="docs/examples/Parallel_Requests_.php"/>
+ <file role="doc" name="docs/examples/Simple_Feed_Aggregator.php"/>
+ <file role="doc" name="docs/examples/extract.php"/>
+ <file role="doc" name="docs/examples/tutorial.txt"/>
+
+ <file role="src" name="http.dsp"/>
+ <file role="src" name="config.w32"/>
+ <file role="src" name="config.m4"/>
+ <file role="src" name="Makefile.frag"/>
+
+ <dir name="phpstr">
+ <file role="src" name="phpstr.h"/>
+ <file role="src" name="phpstr.c"/>
+ </dir>
+
+ <file role="src" name="missing.h"/>
+ <file role="src" name="missing.c"/>
+
+ <file role="src" name="php_http.h"/>
+ <file role="src" name="php_http_std_defs.h"/>
+ <file role="src" name="php_http_api.h"/>
+ <file role="src" name="php_http_cache_api.h"/>
+ <file role="src" name="php_http_date_api.h"/>
+ <file role="src" name="php_http_headers_api.h"/>
+ <file role="src" name="php_http_info_api.h"/>
+ <file role="src" name="php_http_message_api.h"/>
+ <file role="src" name="php_http_request_api.h"/>
+ <file role="src" name="php_http_request_method_api.h"/>
+ <file role="src" name="php_http_request_pool_api.h"/>
+ <file role="src" name="php_http_send_api.h"/>
+ <file role="src" name="php_http_url_api.h"/>
+ <file role="src" name="php_http_util_object.h"/>
+ <file role="src" name="php_http_message_object.h"/>
+ <file role="src" name="php_http_request_object.h"/>
+ <file role="src" name="php_http_requestpool_object.h"/>
+ <file role="src" name="php_http_response_object.h"/>
+ <file role="src" name="php_http_exception_object.h"/>
+
+ <file role="src" name="http.c"/>
+ <file role="src" name="http_functions.c"/>
+ <file role="src" name="http_api.c"/>
+ <file role="src" name="http_cache_api.c"/>
+ <file role="src" name="http_date_api.c"/>
+ <file role="src" name="http_headers_api.c"/>
+ <file role="src" name="http_info_api.c"/>
+ <file role="src" name="http_message_api.c"/>
+ <file role="src" name="http_request_api.c"/>
+ <file role="src" name="http_request_method_api.c"/>
+ <file role="src" name="http_request_pool_api.c"/>
+ <file role="src" name="http_send_api.c"/>
+ <file role="src" name="http_url_api.c"/>
+ <file role="src" name="http_util_object.c"/>
+ <file role="src" name="http_message_object.c"/>
+ <file role="src" name="http_request_object.c"/>
+ <file role="src" name="http_requestpool_object.c"/>
+ <file role="src" name="http_response_object.c"/>
+ <file role="src" name="http_exception_object.c"/>
+
+ <dir name="tests">
+ <file role="test" name="data.txt"/>
+ <file role="test" name="skip.inc"/>
+ <file role="test" name="log.inc"/>
+ <file role="test" name="abs_uri_001.phpt"/>
+ <file role="test" name="abs_uri_002.phpt"/>
+ <file role="test" name="allowed_methods_001.phpt"/>
+ <file role="test" name="allowed_methods_001_logging.phpt"/>
+ <file role="test" name="chunked_decode_001.phpt"/>
+ <file role="test" name="chunked_decode_002.phpt"/>
+ <file role="test" name="date_001.phpt"/>
+ <file role="test" name="date_002.phpt"/>
+ <file role="test" name="get_request_data_001.phpt"/>
+ <file role="test" name="HttpMessage_001.phpt"/>
+ <file role="test" name="HttpRequestPool_001.phpt"/>
+ <file role="test" name="HttpRequest_001.phpt"/>
+ <file role="test" name="HttpRequest_002.phpt"/>
+ <file role="test" name="HttpRequest_003.phpt"/>
+ <file role="test" name="HttpResponse_001.phpt"/>
+ <file role="test" name="HttpResponse_002.phpt"/>
+ <file role="test" name="INI_001.phpt"/>
+ <file role="test" name="parse_headers_001.phpt"/>
+ <file role="test" name="parse_message_001.phpt"/>
+ <file role="test" name="redirect_001.phpt"/>
+ <file role="test" name="redirect_001_logging.phpt"/>
+ <file role="test" name="redirect_002.phpt"/>
+ <file role="test" name="redirect_002_logging.phpt"/>
+ <file role="test" name="redirect_003.phpt"/>
+ <file role="test" name="redirect_003_logging.phpt"/>
+ <file role="test" name="send_data_001.phpt"/>
+ <file role="test" name="send_data_002.phpt"/>
+ <file role="test" name="send_data_003.phpt"/>
+ <file role="test" name="send_data_004.phpt"/>
+ <file role="test" name="send_data_005.phpt"/>
+ <file role="test" name="send_data_006.phpt"/>
+ <file role="test" name="send_data_007_logging.phpt"/>
+ <file role="test" name="send_data_008.phpt"/>
+ <file role="test" name="send_data_009.phpt"/>
+ <file role="test" name="send_file_001.phpt"/>
+ <file role="test" name="send_file_002.phpt"/>
+ <file role="test" name="send_file_003.phpt"/>
+ <file role="test" name="send_file_004.phpt"/>
+ <file role="test" name="send_file_005.phpt"/>
+ <file role="test" name="send_file_006.phpt"/>
+ <file role="test" name="send_file_007.phpt"/>
+ </dir>
+ </dir>
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>4.3</min>
+ <max>6.0.0</max>
+ <exclude>6.0.0</exclude>
+ </php>
+ <pearinstaller>
+ <min>1.4.0</min>
+ </pearinstaller>
+ </required>
+ <optional>
+ <extension>
+ <name>session</name>
+ </extension>
+ </optional>
+ </dependencies>
+ <providesextension>http</providesextension>
+ <extsrcrelease>
+ <configureoption
+ name="with-http-curl-requests"
+ prompt="wheter to enable cURL HTTP requests"
+ default="yes"
+ />
+ <configureoption
+ name="with-http-mhash-etags"
+ prompt="whether to enable mhash ETag generator"
+ default="yes"
+ />
+ <configureoption
+ name="with-http-magic-mime"
+ prompt="whether to enable response content type guessing"
+ default="no"
+ />
+ <!--
+ <filelist>
+ <install as="functions.html" name="docs/functions.html"/>
+ <install as="examples/Bandwidth_Throttling.php" name="docs/examples/Bandwidth_Throttling.php"/>
+ <install as="examples/Cached_Responses.php" name="docs/examples/Cached_Responses.php"/>
+ <install as="examples/GET_Queries.php" name="docs/examples/GET_Queries.php"/>
+ <install as="examples/KISS_XMLRPC_Client.php" name="docs/examples/KISS_XMLRPC_Client.php"/>
+ <install as="examples/Multipart_Posts.php" name="docs/examples/Multipart_Posts.php"/>
+ <install as="examples/Parallel_Requests.php" name="docs/examples/Parallel_Requests.php"/>
+ <install as="examples/Parallel_Requests_.php" name="docs/examples/Parallel_Requests_.php"/>
+ <install as="examples/Simple_Feed_Aggregator.php" name="docs/examples/Simple_Feed_Aggregator.php"/>
+ <install as="examples/extract.php" name="docs/examples/extract.php"/>
+ <install as="examples/tutorial.txt" name="docs/examples/tutorial.txt"/>
+ </filelist>
+ -->
+ </extsrcrelease>
+ <changelog />
+</package>
\ No newline at end of file