cvs: php4 /sapi/apache2filter php_functions.c

From: Date: Fri, 17 May 2002 06:32:07 +0000
Subject: cvs: php4 /sapi/apache2filter php_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11968@lists.php.net to get a copy of this message
jwoolley Fri May 17 02:32:07 2002 EDT Modified files: /php4/sapi/apache2filter php_functions.c Log: apache 2.0's apache_lookup_uri() was returning an array rather than an object, which contradicted both the documentation and the behavior of the same function under apache 1.3. PR: 14999 Index: php4/sapi/apache2filter/php_functions.c diff -u php4/sapi/apache2filter/php_functions.c:1.23 php4/sapi/apache2filter/php_functions.c:1.24 --- php4/sapi/apache2filter/php_functions.c:1.23 Sat May 11 04:58:20 2002 +++ php4/sapi/apache2filter/php_functions.c Fri May 17 02:32:04 2002 @@ -20,6 +20,7 @@ #include "SAPI.h" #include "apr_strings.h" +#include "apr_time.h" #include "ap_config.h" #include "util_filter.h" #include "httpd.h" @@ -69,9 +70,11 @@ } #define ADD_LONG(name) \ - add_assoc_long(return_value, #name, rr->name) + add_property_long(return_value, #name, rr->name) +#define ADD_TIME(name) \ + add_property_long(return_value, #name, rr->name / APR_USEC_PER_SEC); #define ADD_STRING(name) \ - if (rr->name) add_assoc_string(return_value, #name, (char *) rr->name, 1) + if (rr->name) add_property_string(return_value, #name, (char *) rr->name, 1) PHP_FUNCTION(apache_lookup_uri) { @@ -82,13 +85,13 @@ WRONG_PARAM_COUNT; if (rr->status == HTTP_OK) { - array_init(return_value); + object_init(return_value); ADD_LONG(status); ADD_STRING(the_request); ADD_STRING(status_line); ADD_STRING(method); - ADD_LONG(mtime); + ADD_TIME(mtime); ADD_LONG(clength); #if !MODULE_MAGIC_AT_LEAST(20020506,0) ADD_STRING(boundary); @@ -104,6 +107,12 @@ ADD_STRING(filename); ADD_STRING(path_info); ADD_STRING(args); + ADD_LONG(allowed); + ADD_LONG(sent_bodyct); + ADD_LONG(bytes_sent); + ADD_LONG(request_time); + ADD_LONG(mtime); + ADD_TIME(request_time); ap_destroy_sub_req(rr); return;

« previous php.cvs (#11968) next »