diff options
author | Christian Stocker <chregu@php.net> | 2002-08-22 07:48:23 +0000 |
---|---|---|
committer | Christian Stocker <chregu@php.net> | 2002-08-22 07:48:23 +0000 |
commit | 9495fb9d7dc6193c57b62d4e38f8eec1cf9919f7 (patch) | |
tree | 09e8f52187beb97e7e7e945ed14437b01597327f /sapi/apache/mod_php4.c | |
parent | 266193159bfca60a5bd65d611448d9b175ce17fe (diff) | |
download | php-git-9495fb9d7dc6193c57b62d4e38f8eec1cf9919f7.tar.gz |
@ - Added php.ini option "allow_webdav_methods" to allow handling of
@ WebDAV http requests within PHP scripts. (chregu)
# More methods (for DeltaV) will follow.
Diffstat (limited to 'sapi/apache/mod_php4.c')
-rw-r--r-- | sapi/apache/mod_php4.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index dc0500da58..26573a6065 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -488,11 +488,6 @@ static int send_php(request_rec *r, int display_source_mode, char *filename) } zend_first_try { - /* We don't accept OPTIONS requests, but take everything else */ - if (r->method_number == M_OPTIONS) { - r->allowed |= (1 << METHODS) - 1; - return DECLINED; - } /* Make sure file exists */ if (filename == NULL && r->finfo.st_mode == 0) { @@ -503,6 +498,14 @@ static int send_php(request_rec *r, int display_source_mode, char *filename) if (per_dir_conf) { zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); } + + /* We don't accept OPTIONS requests, but take everything else */ + if (!PG(allow_webdav_methods)) { + if (r->method_number == M_OPTIONS) { + r->allowed |= (1 << METHODS) - 1; + return DECLINED; + } + } /* If PHP parser engine has been turned off with an "engine off" * directive, then decline to handle this request |