- add gzip stream filter test
[m6w6/ext-http] / http_message_api.c
index 2a7a1ebbe6bc7ce7ab83672c52ac1bce2d98554e..dd38e7c8a72517fe465b0d2c0648e2c7cc28df1d 100644 (file)
@@ -17,6 +17,7 @@
 #endif
 
 #define HTTP_WANT_CURL
+#define HTTP_WANT_ZLIB
 #include "php_http.h"
 
 #include "SAPI.h"
@@ -288,7 +289,7 @@ PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char
 #endif /* HTTP_HAVE_ZLIB || HAVE_ZLIB */
 
                /* check for following messages */
-               if (continue_at) {
+               if (continue_at && (continue_at < (message + message_length))) {
                        while (isspace(*continue_at)) ++continue_at;
                        if (continue_at < (message + message_length)) {
                                http_message *next = NULL, *most = NULL;