Php version header sent when no_headers is set

From: Date: Tue, 03 Feb 2004 10:27:08 +0000
Subject: Php version header sent when no_headers is set
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-7503@lists.php.net to get a copy of this message
Hi, The Php version header line (SAPI_PHP_VERSION_HEADER) is sent even if SG(request_info).no_headers==1 (in php_request_startup - all other headers aren't sent) Attached a little patch that fix that. Eric Ps: @echo ON ;-)

Index: main.c =================================================================== RCS file: /repository/php-src/main/main.c,v retrieving revision 1.587 diff -u -3 -r1.587 main.c --- main.c 29 Jan 2004 00:08:21 -0000 1.587 +++ main.c 3 Feb 2004 10:04:02 -0000 @@ -1062,7 +1062,7 @@ zend_set_timeout(PG(max_input_time)); } - if (PG(expose_php)) { + if (PG(expose_php) && SG(request_info).no_headers) { sapi_add_header(SAPI_PHP_VERSION_HEADER, sizeof(SAPI_PHP_VERSION_HEADER)-1, 1); }
« previous php.internals (#7503) next »