[AC_DEFINE([HAVE_CURL_FORMGET], [1], [ ])], [ ],
[$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
)
+ PHP_CHECK_LIBRARY(curl, curl_multi_setopt,
+ [AC_DEFINE([HAVE_CURL_MULTI_SETOPT], [1], [ ])], [ ],
+ [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
+ )
fi
dnl ----
HTTP_EMPTY_ARGS(getAttachedRequests);
HTTP_EMPTY_ARGS(getFinishedRequests);
+HTTP_BEGIN_ARGS(enablePipelining, 0)
+ HTTP_ARG_VAL(enable, 0)
+HTTP_END_ARGS;
+
zend_class_entry *http_requestpool_object_ce;
zend_function_entry http_requestpool_object_fe[] = {
HTTP_REQPOOL_ME(__construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
HTTP_REQPOOL_ME(getAttachedRequests, ZEND_ACC_PUBLIC)
HTTP_REQPOOL_ME(getFinishedRequests, ZEND_ACC_PUBLIC)
+
+ HTTP_REQPOOL_ME(enablePipelining, ZEND_ACC_PUBLIC)
EMPTY_FUNCTION_ENTRY
};
}
/* }}} */
+/* {{{ proto bool HttpRequest::enablePiplelinig([bool enable = true])
+ *
+ * Enables pipelining support for all attached requests if support in libcurl is given.
+ *
+ * Returns TRUE on success, or FALSE on failure.
+ */
+PHP_METHOD(HttpRequestPool, enablePipelining)
+{
+ zend_bool enable = 1;
+ getObject(http_requestpool_object, obj);
+
+ if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &enable)) {
+ RETURN_FALSE;
+ }
+#if defined(HAVE_CURL_MULTI_SETOPT) && HTTP_CURL_VERSION(7,16,0)
+ if (CURLM_OK == curl_multi_setopt(obj->pool.ch, CURLMOPT_PIPELINING, (long) enable)) {
+ RETURN_TRUE;
+ }
+#endif
+ RETURN_FALSE;
+}
+/* }}} */
+
#endif /* ZEND_ENGINE_2 && HTTP_HAVE_CURL */
/*
<email>mike@php.net</email>
<active>yes</active>
</lead>
- <date>2006-08-26</date>
+ <date>2006-09-00</date>
<version>
- <release>1.2.1</release>
- <api>1.2.0</api>
+ <release>1.3.0dev</release>
+ <api>1.3.0</api>
</version>
<stability>
<release>stable</release>
</stability>
<license>BSD, revised</license>
<notes><![CDATA[
-+ Added HttpException::__toString() which takes care about any inner exceptions
-- Disallowed detaching HttpRequest objects from HttpRequestPool while executing progress callback
-* Fixed crash on detaching requests from pool in request event callbacks
-* Fixed suppression of nested exceptions in e.g. HttpRequestPool::send() (fixes bug #8535)
-* Fixed issues with inheritance and cloning of HttpDeflateStream, HttpInflateStream and HttpMessage
- (Extending classes lose default properties on instantiation; Complex members ignored during cloning)
++ Added HttpRequestPool::enablePipielining([bool enable = TRUE]) (libcurl >= 7.16.0)
]]></notes>
<contents>
<dir name="/">
#ifndef PHP_EXT_HTTP_H
#define PHP_EXT_HTTP_H
-#define PHP_EXT_HTTP_VERSION "1.2.1"
+#define PHP_EXT_HTTP_VERSION "1.3.0dev"
#ifdef HAVE_CONFIG_H
# include "config.h"
PHP_METHOD(HttpRequestPool, count);
PHP_METHOD(HttpRequestPool, getAttachedRequests);
PHP_METHOD(HttpRequestPool, getFinishedRequests);
+PHP_METHOD(HttpRequestPool, enablePipelining);
#endif
#endif