- implement feature request: 'bodyonly' request option;
[m6w6/ext-http] / http_requestpool_object.c
index 06733d2adbd918090ddef4f2559217608cead609..3a0c0200af8cd46e5da65384739f35600ef52a32 100644 (file)
 
 /* $Id$ */
 
-
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-#include "php.h"
+
+#define HTTP_WANT_CURL
+#include "php_http.h"
 
 #if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL)
 
-#include "php_http_std_defs.h"
+#include "zend_interfaces.h"
+
 #include "php_http_api.h"
-#include "php_http_requestpool_object.h"
-#include "php_http_request_pool_api.h"
-#include "php_http_request_object.h"
 #include "php_http_exception_object.h"
+#include "php_http_request_api.h"
+#include "php_http_request_object.h"
+#include "php_http_request_pool_api.h"
+#include "php_http_requestpool_object.h"
 
-#include "zend_interfaces.h"
 #if defined(HAVE_SPL) && !defined(WONKY)
-#      include "ext/spl/spl_array.h"
-#      include "ext/spl/spl_iterators.h"
-#endif
-
-#ifdef PHP_WIN32
-#      include <winsock2.h>
+/* SPL doesn't install its headers */
+extern PHPAPI zend_class_entry *spl_ce_Countable;
 #endif
-#include <curl/curl.h>
 
 #define HTTP_BEGIN_ARGS(method, req_args)      HTTP_BEGIN_ARGS_EX(HttpRequestPool, method, 0, req_args)
 #define HTTP_EMPTY_ARGS(method, ret_ref)       HTTP_EMPTY_ARGS_EX(HttpRequestPool, method, ret_ref)
@@ -110,7 +107,7 @@ PHP_MINIT_FUNCTION(http_requestpool_object)
 {
        HTTP_REGISTER_CLASS_EX(HttpRequestPool, http_requestpool_object, NULL, 0);
 #if defined(HAVE_SPL) && !defined(WONKY)
-       zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 2, spl_ce_Countable, spl_ce_Iterator);
+       zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 2, spl_ce_Countable, zend_ce_iterator);
 #else
        zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 1, zend_ce_iterator);
 #endif