Skip to content

Commit 95ac779

Browse files
committed
remove unnecessary macros
1 parent 6848cb3 commit 95ac779

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

main/SAPI.c

+4-10
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@
4343

4444
#include "rfc1867.h"
4545

46-
#ifdef PHP_WIN32
47-
#define STRCASECMP stricmp
48-
#else
49-
#define STRCASECMP strcasecmp
50-
#endif
51-
5246
#include "php_content_types.h"
5347

5448
#ifdef ZTS
@@ -778,7 +772,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
778772
colon_offset = strchr(header_line, ':');
779773
if (colon_offset) {
780774
*colon_offset = 0;
781-
if (!STRCASECMP(header_line, "Content-Type")) {
775+
if (!strcasecmp(header_line, "Content-Type")) {
782776
char *ptr = colon_offset+1, *mimetype = NULL, *newheader;
783777
size_t len = header_line_len - (ptr - header_line), newlen;
784778
while (*ptr == ' ') {
@@ -810,7 +804,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
810804
}
811805
efree(mimetype);
812806
SG(sapi_headers).send_default_content_type = 0;
813-
} else if (!STRCASECMP(header_line, "Content-Length")) {
807+
} else if (!strcasecmp(header_line, "Content-Length")) {
814808
/* Script is setting Content-length. The script cannot reasonably
815809
* know the size of the message body after compression, so it's best
816810
* do disable compression altogether. This contributes to making scripts
@@ -820,7 +814,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
820814
zend_alter_ini_entry_chars(key,
821815
"0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
822816
zend_string_release(key);
823-
} else if (!STRCASECMP(header_line, "Location")) {
817+
} else if (!strcasecmp(header_line, "Location")) {
824818
if ((SG(sapi_headers).http_response_code < 300 ||
825819
SG(sapi_headers).http_response_code > 399) &&
826820
SG(sapi_headers).http_response_code != 201) {
@@ -836,7 +830,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
836830
sapi_update_response_code(302);
837831
}
838832
}
839-
} else if (!STRCASECMP(header_line, "WWW-Authenticate")) { /* HTTP Authentication */
833+
} else if (!strcasecmp(header_line, "WWW-Authenticate")) { /* HTTP Authentication */
840834
sapi_update_response_code(401); /* authentication-required */
841835
}
842836
if (sapi_header.header==header_line) {

0 commit comments

Comments
 (0)