43
43
44
44
#include "rfc1867.h"
45
45
46
- #ifdef PHP_WIN32
47
- #define STRCASECMP stricmp
48
- #else
49
- #define STRCASECMP strcasecmp
50
- #endif
51
-
52
46
#include "php_content_types.h"
53
47
54
48
#ifdef ZTS
@@ -778,7 +772,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
778
772
colon_offset = strchr (header_line , ':' );
779
773
if (colon_offset ) {
780
774
* colon_offset = 0 ;
781
- if (!STRCASECMP (header_line , "Content-Type" )) {
775
+ if (!strcasecmp (header_line , "Content-Type" )) {
782
776
char * ptr = colon_offset + 1 , * mimetype = NULL , * newheader ;
783
777
size_t len = header_line_len - (ptr - header_line ), newlen ;
784
778
while (* ptr == ' ' ) {
@@ -810,7 +804,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
810
804
}
811
805
efree (mimetype );
812
806
SG (sapi_headers ).send_default_content_type = 0 ;
813
- } else if (!STRCASECMP (header_line , "Content-Length" )) {
807
+ } else if (!strcasecmp (header_line , "Content-Length" )) {
814
808
/* Script is setting Content-length. The script cannot reasonably
815
809
* know the size of the message body after compression, so it's best
816
810
* 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)
820
814
zend_alter_ini_entry_chars (key ,
821
815
"0" , sizeof ("0" ) - 1 , PHP_INI_USER , PHP_INI_STAGE_RUNTIME );
822
816
zend_string_release (key );
823
- } else if (!STRCASECMP (header_line , "Location" )) {
817
+ } else if (!strcasecmp (header_line , "Location" )) {
824
818
if ((SG (sapi_headers ).http_response_code < 300 ||
825
819
SG (sapi_headers ).http_response_code > 399 ) &&
826
820
SG (sapi_headers ).http_response_code != 201 ) {
@@ -836,7 +830,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
836
830
sapi_update_response_code (302 );
837
831
}
838
832
}
839
- } else if (!STRCASECMP (header_line , "WWW-Authenticate" )) { /* HTTP Authentication */
833
+ } else if (!strcasecmp (header_line , "WWW-Authenticate" )) { /* HTTP Authentication */
840
834
sapi_update_response_code (401 ); /* authentication-required */
841
835
}
842
836
if (sapi_header .header == header_line ) {
0 commit comments