X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_cache_api.c;h=c8ab27cdd8bac0fa322d56a80eb2823f1030285d;hb=13dc652c45a4a0b4dc219e46065bb3310229cedc;hp=f8d1bf029fc396e22648b24c7ce3a75720848b67;hpb=edc84b40eb2c5be04492fa98fec5833a030782eb;p=m6w6%2Fext-http diff --git a/http_cache_api.c b/http_cache_api.c index f8d1bf0..c8ab27c 100644 --- a/http_cache_api.c +++ b/http_cache_api.c @@ -6,19 +6,15 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2005, Michael Wallner | + | Copyright (c) 2004-2006, Michael Wallner | +--------------------------------------------------------------------+ */ /* $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#define HTTP_WANT_SAPI #include "php_http.h" -#include "SAPI.h" #include "php_output.h" #include "php_streams.h" @@ -27,8 +23,6 @@ #include "php_http_date_api.h" #include "php_http_send_api.h" -ZEND_EXTERN_MODULE_GLOBALS(http); - /* {{{ char *http_etag(void *, size_t, http_send_mode) */ PHP_HTTP_API char *_http_etag(const void *data_ptr, size_t data_len, http_send_mode data_mode TSRMLS_DC) { @@ -71,7 +65,7 @@ PHP_HTTP_API time_t _http_last_modified(const void *data_ptr, http_send_mode dat switch (data_mode) { - case SEND_DATA: return time(NULL); + case SEND_DATA: return HTTP_GET_REQUEST_TIME(); case SEND_RSRC: return php_stream_stat((php_stream *) data_ptr, &ssb) ? 0 : ssb.sb.st_mtime; default: return php_stream_stat_path((char *) data_ptr, &ssb) ? 0 : ssb.sb.st_mtime; }