From 3109977ba743ea33bd9308046ed20fccba7e0aee Mon Sep 17 00:00:00 2001 From: zhengchao Date: Mon, 22 Oct 2018 16:41:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E5=8C=85=E5=90=ABcontent-ran?= =?UTF-8?q?ge=E5=A4=B4=E9=83=A8=E7=9A=84http=E4=BC=9A=E8=AF=9D=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E8=BF=9B=E8=A1=8C=E7=BC=93=E5=AD=98=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=92=8C=E6=9B=B4=E6=96=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cache/src/tango_cache_pending.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cache/src/tango_cache_pending.cpp b/cache/src/tango_cache_pending.cpp index 631f1a2..da3e125 100644 --- a/cache/src/tango_cache_pending.cpp +++ b/cache/src/tango_cache_pending.cpp @@ -111,6 +111,10 @@ enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_half *requ int index = 0; const char *value = NULL; 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); if (value != NULL) { @@ -272,7 +276,8 @@ enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_half *resp int index = 0; const char *value = NULL; 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; }