完成cache参数解析部分的编码。

This commit is contained in:
zhengchao
2018-11-07 21:05:21 +08:00
parent 8bfecea928
commit d6862e4ef7
4 changed files with 221 additions and 13 deletions

View File

@@ -115,7 +115,9 @@ enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_half *requ
{
return FORBIDDEN;
}
if(NULL!=tfe_http_std_field_read(request, TFE_HTTP_CONT_RANGE))
if(NULL!=tfe_http_std_field_read(request, TFE_HTTP_CONT_RANGE) ||
NULL!=tfe_http_std_field_read(request, TFE_HTTP_AUTHORIZATION)||
NULL!=tfe_http_nonstd_field_read(request, "WWW-Authenticate"))
{
return FORBIDDEN;
}
@@ -306,7 +308,7 @@ enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_half *resp
else
{
value = tfe_http_std_field_read(response, TFE_HTTP_EXPIRES);
if (value != NULL)
if (value != NULL && 0!= read_GMT_time(value))
{
res = ALLOWED;
}