X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_functions.c;h=d9acab978d3e21568fac7179f2fe5a48282436c2;hp=4ece6965114f435e7312445828109f59fef155e0;hb=4fcbd8e8ae31611c5197ff2369673b5939fc2b80;hpb=3b81f44e1506fa9356db0b630401f8ff95e9d89a diff --git a/http_functions.c b/http_functions.c index 4ece696..d9acab9 100644 --- a/http_functions.c +++ b/http_functions.c @@ -12,17 +12,12 @@ /* $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#define HTTP_WANT_SAPI #define HTTP_WANT_CURL #define HTTP_WANT_ZLIB #include "php_http.h" -#include "SAPI.h" #include "php_ini.h" -#include "ext/standard/info.h" #include "ext/standard/php_string.h" #include "zend_operators.h" @@ -59,7 +54,7 @@ PHP_FUNCTION(http_date) } if (t == -1) { - t = (long) time(NULL); + t = (long) HTTP_GET_REQUEST_TIME(); } RETURN_STRING(http_date(t), 0); @@ -376,7 +371,7 @@ PHP_FUNCTION(http_send_last_modified) } if (t == -1) { - t = (long) time(NULL); + t = (long) HTTP_GET_REQUEST_TIME(); } RETURN_SUCCESS(http_send_last_modified(t)); @@ -456,7 +451,7 @@ PHP_FUNCTION(http_match_modified) // current time if not supplied (senseless though) if (t == -1) { - t = (long) time(NULL); + t = (long) HTTP_GET_REQUEST_TIME(); } if (for_range) { @@ -524,7 +519,7 @@ PHP_FUNCTION(http_cache_last_modified) HTTP_CHECK_HEADERS_SENT(RETURN_FALSE); - t = (long) time(NULL); + t = (long) HTTP_GET_REQUEST_TIME(); /* 0 or omitted */ if (!last_modified) {