Skip to content

Commit 85dbbe1

Browse files
committed
Fix #71465: PHAR doesn't know about litespeed
We should perhaps look into a generic system to ask the SAPI whether a feature should be supported or not. Or, we should look into making a denylist instead of an allowlist. Anyway, let's not try doing anything fancy on stable branches. Closes GH-13070.
1 parent 96ffe6a commit 85dbbe1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.2.16
44

5+
- Phar:
6+
. Fixed bug #71465 (PHAR doesn't know about litespeed). (nielsdos)
57

68
18 Jan 2024, PHP 8.2.15
79

ext/phar/phar_object.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,8 @@ PHP_METHOD(Phar, webPhar)
599599

600600
if ((sapi_mod_name_len == sizeof("cgi-fcgi") - 1 && !strncmp(sapi_module.name, "cgi-fcgi", sizeof("cgi-fcgi") - 1))
601601
|| (sapi_mod_name_len == sizeof("fpm-fcgi") - 1 && !strncmp(sapi_module.name, "fpm-fcgi", sizeof("fpm-fcgi") - 1))
602-
|| (sapi_mod_name_len == sizeof("cgi") - 1 && !strncmp(sapi_module.name, "cgi", sizeof("cgi") - 1))) {
602+
|| (sapi_mod_name_len == sizeof("cgi") - 1 && !strncmp(sapi_module.name, "cgi", sizeof("cgi") - 1))
603+
|| (sapi_mod_name_len == sizeof("litespeed") - 1 && !strncmp(sapi_module.name, "litespeed", sizeof("litespeed") - 1))) {
603604

604605
if (Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) != IS_UNDEF) {
605606
HashTable *_server = Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]);

0 commit comments

Comments
 (0)