# you better don't look inside
[m6w6/ext-http] / http_request_object.c
index 2ed979789b009c8a93b2c983baca769b5a50a946..925cd6d06b5bf84f3e3f3507c190fd04a8fa37bb 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 "zend_interfaces.h"
 
-#include "php_http_std_defs.h"
-#include "php_http_request_object.h"
-#include "php_http_request_api.h"
-#include "php_http_request_pool_api.h"
-#include "php_http.h"
 #include "php_http_api.h"
-#include "php_http_url_api.h"
+#include "php_http_exception_object.h"
 #include "php_http_message_api.h"
 #include "php_http_message_object.h"
-#include "php_http_exception_object.h"
-
-#include "missing.h"
-
-#ifdef PHP_WIN32
-#      include <winsock2.h>
-#endif
-#include <curl/curl.h>
+#include "php_http_request_api.h"
+#include "php_http_request_object.h"
+#include "php_http_request_pool_api.h"
+#include "php_http_url_api.h"
 
 ZEND_EXTERN_MODULE_GLOBALS(http);
 
@@ -1894,7 +1886,7 @@ PHP_METHOD(HttpRequest, getRequestMessage)
                getObject(http_request_object, obj);
 
                SET_EH_THROW_HTTP();
-               if (msg = http_message_parse(PHPSTR_VAL(&obj->request), PHPSTR_LEN(&obj->request))) {
+               if ((msg = http_message_parse(PHPSTR_VAL(&obj->request), PHPSTR_LEN(&obj->request)))) {
                        ZVAL_OBJVAL(return_value, http_message_object_new_ex(http_message_object_ce, msg, NULL));
                }
                SET_EH_NORMAL();
@@ -1930,7 +1922,7 @@ PHP_METHOD(HttpRequest, getHistory)
                getObject(http_request_object, obj);
 
                SET_EH_THROW_HTTP();
-               if (msg = http_message_parse(PHPSTR_VAL(&obj->history), PHPSTR_LEN(&obj->history))) {
+               if ((msg = http_message_parse(PHPSTR_VAL(&obj->history), PHPSTR_LEN(&obj->history)))) {
                        ZVAL_OBJVAL(return_value, http_message_object_new_ex(http_message_object_ce, msg, NULL));
                }
                SET_EH_NORMAL();