X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_api.c;h=444e43fe5a6929992d3c04317a55d9ac9485cf1c;hp=9818721a1efd0921a65baf260b4285bef6d33a76;hb=4fcbd8e8ae31611c5197ff2369673b5939fc2b80;hpb=3b81f44e1506fa9356db0b630401f8ff95e9d89a diff --git a/http_request_api.c b/http_request_api.c index 9818721..444e43f 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -12,10 +12,7 @@ /* $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#define HTTP_WANT_SAPI #define HTTP_WANT_CURL #include "php_http.h" @@ -590,7 +587,7 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti if (Z_LVAL_P(zoption) > 0) { HTTP_CURL_OPT(TIMEVALUE, Z_LVAL_P(zoption)); } else { - HTTP_CURL_OPT(TIMEVALUE, time(NULL) + Z_LVAL_P(zoption)); + HTTP_CURL_OPT(TIMEVALUE, HTTP_GET_REQUEST_TIME() + Z_LVAL_P(zoption)); } HTTP_CURL_OPT(TIMECONDITION, range_req ? CURL_TIMECOND_IFUNMODSINCE : CURL_TIMECOND_IFMODSINCE); } else {