com php-src: Fixed a bug in apache_request_headers() that adds an extra \0 to header name.: sapi/litespeed/lsapi_main.c
| From: | George Wang | Date: | Thu, 17 Dec 2015 20:20:08 +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-90321@lists.php.net to get a copy of this message | ||
Commit: 0a1a4dc033aca454c6d9a3668b5d0e5bb5ec367e
Author: George Wang <gwang@php.net> Thu, 17 Dec 2015 15:20:08 -0500
Parents: a3e19527004dc67dfd875e758007b8ae135d4ed1
Branches: PHP-7.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0a1a4dc033aca454c6d9a3668b5d0e5bb5ec367e
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 0c9ea49..bbdc13d 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -1170,11 +1170,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;
}
@@ -1228,11 +1224,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);
}
}
}