return FAILURE;
}
} else {
- if (CURLE_OK != curl_easy_setopt(ch, CURLOPT_TIMEVALUE, (long) PHP_HTTP_G->env.request.time + Z_LVAL_P(val))) {
+ if (CURLE_OK != curl_easy_setopt(ch, CURLOPT_TIMEVALUE, (long) sapi_get_request_time(TSRMLS_C) + Z_LVAL_P(val))) {
return FAILURE;
}
}
PHP_RINIT_FUNCTION(http_env)
{
- PHP_HTTP_G->env.request.time = sapi_get_request_time(TSRMLS_C);
-
/* populate form data on non-POST requests */
if (SG(request_info).request_method && strcasecmp(SG(request_info).request_method, "POST") && SG(request_info).content_type && *SG(request_info).content_type) {
uint ct_len = strlen(SG(request_info).content_type);
char *etag_mode;
struct {
- time_t time;
HashTable *headers;
php_http_message_body_t *body;
} request;
size_t php_http_boundary(char *buf, size_t buf_len TSRMLS_DC)
{
- return snprintf(buf, buf_len, "%15.15F", PHP_HTTP_G->env.request.time * php_combined_lcg(TSRMLS_C));
+ return snprintf(buf, buf_len, "%15.15F", sapi_get_request_time(TSRMLS_C) * php_combined_lcg(TSRMLS_C));
}
int php_http_select_str(const char *cmp, int argc, ...)