对于包含content-range头部的http会话,不进行缓存查询和更新。
This commit is contained in:
7
cache/src/tango_cache_pending.cpp
vendored
7
cache/src/tango_cache_pending.cpp
vendored
@@ -111,6 +111,10 @@ enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_half *requ
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
const char *value = NULL;
|
const char *value = NULL;
|
||||||
memset(restrict,0,sizeof(struct request_freshness));
|
memset(restrict,0,sizeof(struct request_freshness));
|
||||||
|
if(NULL!=tfe_http_std_field_read(request, TFE_HTTP_CONT_RANGE))
|
||||||
|
{
|
||||||
|
return FORBIDDEN;
|
||||||
|
}
|
||||||
value = tfe_http_std_field_read(request, TFE_HTTP_PRAGMA);
|
value = tfe_http_std_field_read(request, TFE_HTTP_PRAGMA);
|
||||||
if (value != NULL)
|
if (value != NULL)
|
||||||
{
|
{
|
||||||
@@ -272,7 +276,8 @@ enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_half *resp
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
const char *value = NULL;
|
const char *value = NULL;
|
||||||
memset(freshness,0,sizeof(struct response_freshness));
|
memset(freshness,0,sizeof(struct response_freshness));
|
||||||
if(response->resp_spec.resp_code!=TFE_HTTP_STATUS_OK)
|
if(response->resp_spec.resp_code!=TFE_HTTP_STATUS_OK
|
||||||
|
|| NULL!=tfe_http_std_field_read(response, TFE_HTTP_CONT_RANGE)) //NOT upload response with content-range
|
||||||
{
|
{
|
||||||
return FORBIDDEN;
|
return FORBIDDEN;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user