- fix endless loop in http_build_url() with urls like "/.foo"
[m6w6/ext-http] / http.c
diff --git a/http.c b/http.c
index 4c285ef23c8872f2f9c3af4650e11b7a2387a072..41456dc3f8f7ac7d5462f7963c4aab0160f0761d 100644 (file)
--- a/http.c
+++ b/http.c
@@ -39,6 +39,7 @@
 #      include "php_http_filter_api.h"
 #      include "php_http_util_object.h"
 #      include "php_http_message_object.h"
+#      include "php_http_querystring_object.h"
 #      ifndef WONKY
 #              include "php_http_response_object.h"
 #      endif
@@ -170,6 +171,7 @@ static inline void _http_globals_init(zend_http_globals *G TSRMLS_DC)
 #ifndef HTTP_HAVE_SAPI_RTIME
        G->request_time = time(NULL);
 #endif
+       G->read_post_data = 0;
 }
 
 #define http_globals_free(g) _http_globals_free((g) TSRMLS_CC)
@@ -251,6 +253,7 @@ PHP_MINIT_FUNCTION(http)
        if (    (SUCCESS != PHP_MINIT_CALL(http_filter))                        ||
                        (SUCCESS != PHP_MINIT_CALL(http_util_object))           ||
                        (SUCCESS != PHP_MINIT_CALL(http_message_object))        ||
+                       (SUCCESS != PHP_MINIT_CALL(http_querystring_object))||
 #      ifndef WONKY
                        (SUCCESS != PHP_MINIT_CALL(http_response_object))       ||
 #      endif /* WONKY */