cvs: /php4 main.c /php4/sapi/isapi php4isapi.c
| From: | Sascha Schumann | Date: | Fri, 03 Dec 1999 12:22:28 +0000 |
| Subject: | cvs: /php4 main.c /php4/sapi/isapi php4isapi.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-7317@lists.php.net to get a copy of this message | ||
sas Fri Dec 3 07:22:28 1999 EDT
Modified files:
/php4 main.c
/php4/sapi/isapi php4isapi.c
Log:
Add X-Powered-By header in all configurations to ease PHP usage metering
Index: php4/main.c
diff -u php4/main.c:1.144 php4/main.c:1.145
--- php4/main.c:1.144 Fri Dec 3 00:03:15 1999
+++ php4/main.c Fri Dec 3 07:21:56 1999
@@ -19,7 +19,7 @@
*/
-/* $Id: main.c,v 1.144 1999/12/03 05:03:15 rasmus Exp $ */
+/* $Id: main.c,v 1.145 1999/12/03 12:21:56 sas Exp $ */
#include <stdio.h>
@@ -743,6 +743,10 @@
sapi_activate(SLS_C);
php_set_timeout(PG(max_execution_time));
+
+ if (PG(expose_php)) {
+ sapi_add_header(estrdup(SAPI_PHP_VERSION_HEADER), sizeof(SAPI_PHP_VERSION_HEADER) - 1);
+ }
if (PG(output_buffering)) {
php_start_ob_buffering();
Index: php4/sapi/isapi/php4isapi.c
diff -u php4/sapi/isapi/php4isapi.c:1.4 php4/sapi/isapi/php4isapi.c:1.5
--- php4/sapi/isapi/php4isapi.c:1.4 Fri Nov 26 11:51:56 1999
+++ php4/sapi/isapi/php4isapi.c Fri Dec 3 07:21:57 1999
@@ -174,16 +174,12 @@
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 */
@@ -191,9 +187,6 @@
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';