summaryrefslogtreecommitdiff
path: root/cache
diff options
context:
space:
mode:
authorzhangchengwei <[email protected]>2018-11-20 17:50:58 +0800
committerzhengchao <[email protected]>2018-11-23 21:17:58 +0800
commit82b5b0d1030e6d2bc7f116519d1124069e48880d (patch)
tree8f80cb028d098850f6e0cfbaa4aa015444c1c235 /cache
parentf83f3a48f9e334cd9f349cbbf1f36c053bb53956 (diff)
调整expires头部解析
Diffstat (limited to 'cache')
-rw-r--r--cache/src/tango_cache_tools.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/cache/src/tango_cache_tools.cpp b/cache/src/tango_cache_tools.cpp
index 0b78468..e22a8b9 100644
--- a/cache/src/tango_cache_tools.cpp
+++ b/cache/src/tango_cache_tools.cpp
@@ -220,7 +220,6 @@ int mkdir_according_path(const char * path)
time_t expires_hdr2timestamp(const char *expires_val, int len)
{
struct tm tm;
- time_t expire;
while(len > 0 && (*expires_val==' '||*expires_val=='\t'||*expires_val=='\r'||*expires_val=='\n'))
{
@@ -238,8 +237,7 @@ time_t expires_hdr2timestamp(const char *expires_val, int len)
return 0;
}
- expire = mktime(&tm);
- return expire;
+ return mktime(&tm);
}
//������ʱ���ת��ΪGMTʱ���ַ���