summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlishu <[email protected]>2018-12-12 13:19:36 +0800
committerlishu <[email protected]>2018-12-12 13:19:36 +0800
commitaa8c58e98beef3f68fb0fc2647db2b5efae997c4 (patch)
tree3ee16a0aa1b755dfb481157fcde1b6afcbfc4d3b
parentae77019201515e1c94c8ca7c3ebab99c059ec641 (diff)
更新Lib
-rw-r--r--readme.md (renamed from readme.txt)0
-rw-r--r--src/inc/tango_cache_pending.h97
-rw-r--r--src/lib/libcjson.abin0 -> 42168 bytes
-rw-r--r--src/lib/libcrypto.abin0 -> 5788576 bytes
-rw-r--r--src/lib/libcurl.abin0 -> 834506 bytes
-rw-r--r--src/lib/libevent.abin0 -> 649304 bytes
-rw-r--r--src/lib/libhiredis.abin0 -> 460318 bytes
-rw-r--r--src/lib/libssl.abin0 -> 1019068 bytes
-rw-r--r--src/lib/libtango_cache_client.abin0 -> 353972 bytes
-rw-r--r--src/lib/libxml2.abin0 -> 2736692 bytes
10 files changed, 97 insertions, 0 deletions
diff --git a/readme.txt b/readme.md
index 602038b..602038b 100644
--- a/readme.txt
+++ b/readme.md
diff --git a/src/inc/tango_cache_pending.h b/src/inc/tango_cache_pending.h
new file mode 100644
index 0000000..a8d5858
--- /dev/null
+++ b/src/inc/tango_cache_pending.h
@@ -0,0 +1,97 @@
+#pragma once
+
+#include<time.h>
+
+enum tfe_http_std_field
+{
+ TFE_HTTP_UNKNOWN_FIELD = 0,
+ TFE_HTTP_HOST,
+ TFE_HTTP_REFERER,
+ TFE_HTTP_USER_AGENT,
+ TFE_HTTP_COOKIE,
+ TFE_HTTP_PROXY_AUTHORIZATION,
+ TFE_HTTP_AUTHORIZATION,
+ TFE_HTTP_LOCATION,
+ TFE_HTTP_SERVER,
+ TFE_HTTP_ETAG,
+ TFE_HTTP_DATE,
+ TFE_HTTP_TRAILER,
+ TFE_HTTP_TRANSFER_ENCODING,
+ TFE_HTTP_VIA,
+ TFE_HTTP_PRAGMA,
+ TFE_HTTP_CONNECTION,
+ TFE_HTTP_CONT_ENCODING,
+ TFE_HTTP_CONT_LANGUAGE,
+ TFE_HTTP_CONT_LOCATION,
+ TFE_HTTP_CONT_RANGE,
+ TFE_HTTP_CONT_LENGTH,
+ TFE_HTTP_CONT_TYPE,
+ TFE_HTTP_CONT_DISPOSITION,
+ TFE_HTTP_EXPIRES,
+ TFE_HTTP_ACCEPT_ENCODING,
+ TFE_HTTP_CACHE_CONTROL,
+ TLF_HTTP_IF_MATCH,
+ TLF_HTTP_IF_NONE_MATCH,
+ TLF_HTTP_IF_MODIFIED_SINCE,
+ TLF_HTTP_IF_UNMODIFIED_SINCE,
+ TLF_HTTP_LAST_MODIFIED
+};
+
+
+enum cache_pending_action {
+ UNDEFINED = 0,
+ ALLOWED,
+ FORBIDDEN,
+ VERIFY
+};
+
+
+struct tfe_http_field {
+
+ enum tfe_http_std_field http_field;
+ const char* value;
+};
+
+
+struct request_freshness {
+ time_t min_fresh;
+ time_t max_age;
+};
+
+
+struct response_freshness{
+ time_t date;
+ time_t last_modified;
+ time_t timeout;
+};
+
+/*
+函数功能:
+根据请求头字段判断是否允许将缓存作为该请求的响应,并且将请求字段对缓存新鲜度的约束范围作为传出参数返回给调用者
+参数:
+request:HTTP请求字段信息,包括Pragma,Cache-Control,If-Match,If-None-Match,If-Modified-Since,If-Unmodified-Since字段
+n_fields:request包含的HTTP请求字段数目
+restrict:如果该函数返回值为ALLOWED,则返回请求Cache-Control字段包括的min-fresh或者max-age值;否则返回值为0
+返回值:
+UNDEFINED = 0,//请求字段中未定义缓存的行为
+ALLOWED ,//允许使用缓存作为该请求的响应
+FORBIDDEN,//禁止使用缓存作为该请求的响应,需要向源服务器请求
+VERIFY,//禁止使用未验证有效性的缓存作为该请求的响应
+*/
+enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_field *request, size_t n_fields,struct request_freshness* restrict);
+
+
+
+/*
+函数功能:
+根据响应字段判断该响应是否允许被缓存,并且将响应的新鲜度、date或者last-modified值作为传出参数返回给调用者
+参数:
+response:HTTP响应字段信息,包括Pragma,Cache-Control,Expires、Date、Last-Modified字段
+n_fields:response包含的HTTP响应字段数目
+freshness:如果该函数返回值为ALLOWED,则返回响应Cache-Control字段的s-maxage/max-age值以及Date字段、Last-Modified字段相对时间
+返回值:
+UNDEFINED = 0,//响应字段中未定义缓存的行为
+ALLOWED ,//允许缓存该响应
+FORBIDDEN,//禁止缓存该响应
+*/
+enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_field *response, size_t n_fields, struct response_freshness* freshness); \ No newline at end of file
diff --git a/src/lib/libcjson.a b/src/lib/libcjson.a
new file mode 100644
index 0000000..cb5fed5
--- /dev/null
+++ b/src/lib/libcjson.a
Binary files differ
diff --git a/src/lib/libcrypto.a b/src/lib/libcrypto.a
new file mode 100644
index 0000000..7c1224f
--- /dev/null
+++ b/src/lib/libcrypto.a
Binary files differ
diff --git a/src/lib/libcurl.a b/src/lib/libcurl.a
new file mode 100644
index 0000000..d938a26
--- /dev/null
+++ b/src/lib/libcurl.a
Binary files differ
diff --git a/src/lib/libevent.a b/src/lib/libevent.a
new file mode 100644
index 0000000..2881fa9
--- /dev/null
+++ b/src/lib/libevent.a
Binary files differ
diff --git a/src/lib/libhiredis.a b/src/lib/libhiredis.a
new file mode 100644
index 0000000..38f7fe4
--- /dev/null
+++ b/src/lib/libhiredis.a
Binary files differ
diff --git a/src/lib/libssl.a b/src/lib/libssl.a
new file mode 100644
index 0000000..bab5589
--- /dev/null
+++ b/src/lib/libssl.a
Binary files differ
diff --git a/src/lib/libtango_cache_client.a b/src/lib/libtango_cache_client.a
new file mode 100644
index 0000000..c103ee6
--- /dev/null
+++ b/src/lib/libtango_cache_client.a
Binary files differ
diff --git a/src/lib/libxml2.a b/src/lib/libxml2.a
new file mode 100644
index 0000000..d803f5f
--- /dev/null
+++ b/src/lib/libxml2.a
Binary files differ