Skip to content

Commit 29be52f

Browse files
author
Ilia Alshanetsky
committed
A slightly better content-type check.
1 parent 5f67f05 commit 29be52f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sapi/apache2filter/sapi_apache2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ static void php_insert_filter(request_rec *r)
575575
int content_type_len = strlen("application/x-httpd-php");
576576

577577
if (r->content_type && !strncmp(r->content_type, "application/x-httpd-php", content_type_len-1)) {
578-
if (r->content_type[content_type_len] == '\0' || !strncmp(r->content_type+content_type_len, "-source", strlen("-source"))) {
578+
if (r->content_type[content_type_len] == '\0' || !strncmp(r->content_type+content_type_len, "-source", sizeof("-source"))) {
579579
php_add_filter(r, r->output_filters);
580580
php_add_filter(r, r->input_filters);
581581
}

0 commit comments

Comments
 (0)