-
-ZEND_EXTERN_MODULE_GLOBALS(http);
-
-/* {{{ STATUS http_cache_exit(char *, zend_bool) */
-STATUS _http_cache_exit_ex(char *cache_token, zend_bool etag, zend_bool free_token TSRMLS_DC)
-{
- if (HTTP_G(cache_log) && strlen(HTTP_G(cache_log))) {
- php_stream *log = php_stream_open_wrapper(HTTP_G(cache_log), "ab", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
-
- if (log) {
- time_t now;
- struct tm nowtm;
- char datetime[128];
-
- time(&now);
- strftime(datetime, sizeof(datetime), "%Y-%m-%d %H:%M:%S", php_localtime_r(&now, &nowtm));
- php_stream_printf(log TSRMLS_CC, "%s [%s] %32s %s\n", datetime, etag ? "ETAG":"LMOD", cache_token, SG(request_info).request_uri);
- php_stream_close(log);
- }
- }
- if (free_token && cache_token) {
- efree(cache_token);
- }
- return http_exit_ex(304, NULL, 0);
-}
-/* }}} */