X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_cache_api.c;h=c8ab27cdd8bac0fa322d56a80eb2823f1030285d;hb=13dc652c45a4a0b4dc219e46065bb3310229cedc;hp=dab555238c98cfb82509f75d3d453e8967b7cf40;hpb=0acbfc76b5a3e4122a6d06d64bd834a810806656;p=m6w6%2Fext-http diff --git a/http_cache_api.c b/http_cache_api.c index dab5552..c8ab27c 100644 --- a/http_cache_api.c +++ b/http_cache_api.c @@ -6,29 +6,22 @@ | 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 -#include "php.h" +#define HTTP_WANT_SAPI +#include "php_http.h" -#include "SAPI.h" -#include "php_streams.h" #include "php_output.h" +#include "php_streams.h" -#include "php_http.h" -#include "php_http_std_defs.h" #include "php_http_api.h" #include "php_http_cache_api.h" -#include "php_http_send_api.h" #include "php_http_date_api.h" - -ZEND_EXTERN_MODULE_GLOBALS(http); +#include "php_http_send_api.h" /* {{{ 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) @@ -72,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; }