cvs: pecl /http http_message_api.c
| From: | Michael Wallner | Date: | Mon, 11 Apr 2005 10:12:27 +0000 |
| Subject: | cvs: pecl /http http_message_api.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-2969@lists.php.net to get a copy of this message | ||
mike Mon Apr 11 06:12:27 2005 EDT
Modified files:
/pecl/http http_message_api.c
Log:
- check for success
http://cvs.php.net/diff.php/pecl/http/http_message_api.c?r1=1.4&r2=1.5&ty=u
Index: pecl/http/http_message_api.c
diff -u pecl/http/http_message_api.c:1.4 pecl/http/http_message_api.c:1.5
--- pecl/http/http_message_api.c:1.4 Mon Apr 11 06:04:34 2005
+++ pecl/http/http_message_api.c Mon Apr 11 06:12:26 2005
@@ -13,7 +13,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: http_message_api.c,v 1.4 2005/04/11 10:04:34 mike Exp $ */
+/* $Id: http_message_api.c,v 1.5 2005/04/11 10:12:26 mike Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -66,7 +66,10 @@
header_length = message_length;
}
- http_parse_headers_cb(message, header_length, &msg->hdrs, 1,
http_message_parse_headers_callback, (void **) &msg);
+ if (SUCCESS != http_parse_headers_cb(message, header_length, &msg->hdrs, 1,
http_message_parse_headers_callback, (void **) &msg)) {
+ http_message_free(msg);
+ return NULL;
+ }
if (body) {
phpstr_from_string_ex(PHPSTR(msg), body, message_length - header_length);