cvs: pecl /http http_headers_api.c

From: Date: Mon, 11 Apr 2005 10:26:58 +0000
Subject: cvs: pecl /http http_headers_api.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-2968@lists.php.net to get a copy of this message
mike Mon Apr 11 06:26:58 2005 EDT Modified files: /pecl/http http_headers_api.c Log: oops, typos causing mem-corruption http://cvs.php.net/diff.php/pecl/http/http_headers_api.c?r1=1.3&r2=1.4&ty=u Index: pecl/http/http_headers_api.c diff -u pecl/http/http_headers_api.c:1.3 pecl/http/http_headers_api.c:1.4 --- pecl/http/http_headers_api.c:1.3 Mon Apr 11 06:04:34 2005 +++ pecl/http/http_headers_api.c Mon Apr 11 06:26:58 2005 @@ -13,7 +13,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http_headers_api.c,v 1.3 2005/04/11 10:04:34 mike Exp $ */ +/* $Id: http_headers_api.c,v 1.4 2005/04/11 10:26:58 mike Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -267,7 +267,7 @@ if ( (!strncmp(header, "HTTP/1.", lenof("HTTP/1."))) || (!strncmp(line - lenof("HTTP/1.x\r") + value_len, "HTTP/1.", lenof("HTTP/1.")))) { if (func) { - func(callback_data, header, header - (line + 1), &headers TSRMLS_CC); + func(callback_data, header, line - header + value_len, &headers TSRMLS_CC); Z_ARRVAL(array) = headers; } } else @@ -346,7 +346,7 @@ /* response */ if (!strncmp(http_line, "HTTP/1.", lenof("HTTP/1."))) { - add_assoc_stringl(&array, "Response Status", http_line + lenof("HTTP/1.x "), line_length - lenof("HTTP/1.x \r\n"), 0); + add_assoc_stringl(&array, "Response Status", http_line + lenof("HTTP/1.x "), line_length - lenof("HTTP/1.x \r\n"), 1); } else /* request */ if (!strncmp(http_line + line_length - lenof("HTTP/1.x\r\n"), "HTTP/1.", lenof("HTTP/1."))) {

« previous php.pecl.cvs (#2968) next »