com php-src: Fixed a bug in apache_request_headers() that adds an extra \0 to header name.: sapi/litespeed/lsapi_main.c

From: Date: Thu, 17 Dec 2015 20:24:59 +0000
Subject: com php-src: Fixed a bug in apache_request_headers() that adds an extra \0 to header name.: sapi/litespeed/lsapi_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-90322@lists.php.net to get a copy of this message
Commit: 70addd33d0110e3e5ef0537cdc5c7435ffab1acf Author: George Wang <gwang@php.net> Thu, 17 Dec 2015 15:20:08 -0500 Parents: 13096a8120fe845691dc5f8cbe17dd0572cc19c4 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=70addd33d0110e3e5ef0537cdc5c7435ffab1acf Log: Fixed a bug in apache_request_headers() that adds an extra \0 to header name. Changed paths: M sapi/litespeed/lsapi_main.c Diff: diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index ebaa91f..c060cd6 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -1171,11 +1171,7 @@ zend_module_entry litespeed_module_entry = { static int add_associate_array( const char * pKey, int keyLen, const char * pValue, int valLen, void * arg ) { - add_assoc_string_ex( (zval *)arg, (char *)pKey, keyLen+1, (char *)pValue -#if PHP_MAJOR_VERSION < 7 - , 1 -#endif - ); + add_assoc_string_ex((zval *)arg, (char *)pKey, keyLen, (char *)pValue); return 1; } @@ -1229,11 +1225,7 @@ PHP_FUNCTION(litespeed_response_headers) headerBuf[len] = 0; if ( len ) { while( isspace(*++p)); - add_assoc_string_ex(return_value, headerBuf, len+1, p -#if PHP_MAJOR_VERSION < 7 - , 1 -#endif - ); + add_assoc_string_ex(return_value, headerBuf, len, p); } } }

« previous php.cvs (#90322) next »