Hi, I've been trying to set up PHP 4.2.3 that works with Apache 2.0.43 running on Red Hat Linux 6.2 server, but could not find a way to let it reply correctly to requests with If-Modified-Since: header other than to modify PHP source code.
Below is the patch I am using now, which is "borrowed" from the Apache mod_include.c source code. Would someone please comment on this .. Is this opening up, for example, a security hole? I could not test 4.3.0-pre1 thoroughly because it did not work when I used it with multibyte character contents, but the header issue seems to be the same. Thanks in advance, Ryo --- sapi/apache2filter/sapi_apache2.c~ Fri Aug 16 07:27:03 2002 +++ sapi/apache2filter/sapi_apache2.c Mon Oct 14 23:27:26 2002 @@ -558,14 +558,24 @@ return OK; } +static int includes_setup(ap_filter_t *f) +{ + /* We will ALWAYS set the no_local_copy value to 1 so + * that we will not send 304s. + */ + f->r->no_local_copy = 1; + + return OK; +} + static void php_register_hook(apr_pool_t *p) { ap_hook_pre_config(php_pre_config, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_config(php_apache_server_startup, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_insert_filter(php_insert_filter, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_read_request(php_post_read_request, NULL, NULL, APR_HOOK_MIDDLE); - ap_register_output_filter("PHP", php_output_filter, NULL, AP_FTYPE_RESOURCE); - ap_register_input_filter("PHP", php_input_filter, NULL, AP_FTYPE_RESOURCE); + ap_register_output_filter("PHP", php_output_filter, includes_setup, +AP_FTYPE_RESOURCE); + ap_register_input_filter("PHP", php_input_filter, includes_setup, +AP_FTYPE_RESOURCE); } AP_MODULE_DECLARE_DATA module php4_module = { -- TAKAGI Ryo <[EMAIL PROTECTED]> -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php