cvs: /php4 SAPI.h /php4/php4isapi php4isapi.c

From: Date: Sun, 12 Sep 1999 21:07:53 +0000
Subject: cvs: /php4 SAPI.h /php4/php4isapi php4isapi.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-4371@lists.php.net to get a copy of this message
zeev Sun Sep 12 17:07:53 1999 EDT Modified files: /php4 SAPI.h /php4/php4isapi php4isapi.c Log: Add PHP-Version header in IIS Index: php4/SAPI.h diff -u php4/SAPI.h:1.18 php4/SAPI.h:1.19 --- php4/SAPI.h:1.18 Fri Jul 16 09:12:41 1999 +++ php4/SAPI.h Sun Sep 12 17:07:53 1999 @@ -150,7 +150,8 @@ #define SAPI_HEADER_DO_SEND 2 #define SAPI_HEADER_SEND_FAILED 3 -#define SAPI_DEFAULT_CONTENT_TYPE "Content-Type: text/html" +#define SAPI_DEFAULT_CONTENT_TYPE "Content-Type: text/html" +#define SAPI_PHP_VERSION_HEADER "PHP-Version: " PHP_VERSION #define SAPI_POST_READER_FUNC(post_reader) void post_reader(char *content_type_dup SLS_DC) Index: php4/php4isapi/php4isapi.c diff -u php4/php4isapi/php4isapi.c:1.26 php4/php4isapi/php4isapi.c:1.27 --- php4/php4isapi/php4isapi.c:1.26 Thu Sep 2 22:39:38 1999 +++ php4/php4isapi/php4isapi.c Sun Sep 12 17:07:53 1999 @@ -149,11 +149,16 @@ HSE_SEND_HEADER_EX_INFO header_info; char status_buf[MAX_STATUS_LENGTH]; sapi_header_struct default_content_type = { SAPI_DEFAULT_CONTENT_TYPE, sizeof(SAPI_DEFAULT_CONTENT_TYPE)-1 }; + sapi_header_struct php_version_header = { SAPI_PHP_VERSION_HEADER, sizeof(SAPI_PHP_VERSION_HEADER)-1 }; + PLS_FETCH(); /* Obtain headers length */ if (SG(sapi_headers).send_default_content_type) { accumulate_header_length(&default_content_type, (void *) &total_length); } + if (PG(expose_php)) { + accumulate_header_length(&php_version_header, (void *) &total_length); + } zend_llist_apply_with_argument(&SG(sapi_headers).headers, (void (*)(void *, void *)) accumulate_header_length, (void *) &total_length); /* Generate headers */ @@ -161,6 +166,9 @@ combined_headers_ptr = combined_headers; if (SG(sapi_headers).send_default_content_type) { concat_header(&default_content_type, (void *) &combined_headers_ptr); + } + if (PG(expose_php)) { + concat_header(&php_version_header, (void *) &combined_headers_ptr); } zend_llist_apply_with_argument(&SG(sapi_headers).headers, (void (*)(void *, void *)) concat_header, (void *) &combined_headers_ptr); *combined_headers_ptr++ = '\r';

« previous php.version4 (#4371) next »