This is an automated email from the ASF dual-hosted git repository. scw00 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push: new a59f1df Check Range header for stale content a59f1df is described below commit a59f1dfa9fc2840bbdca1e69fcb84b3e2ed470a9 Author: ydyuan <1975643...@qq.com> AuthorDate: Wed Nov 6 12:26:44 2019 +0800 Check Range header for stale content Fix bug: 1. Ats cached a stale content 2. Then we set cache.config making this content never-cache 3. We send a request to ats for this content with a Range header 4. ATS send a request to os with ims header 5. The os returned 304 to ats 6. ATS return 200 to client. --- proxy/http/HttpTransact.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index c9ca406..80d61ea 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -4188,6 +4188,10 @@ HttpTransact::handle_cache_operation_on_forward_server_response(State *s) s->cache_info.action = CACHE_DO_DELETE; s->next_action = SM_ACTION_SERVER_READ; } else { + if (s->hdr_info.client_request.presence(MIME_PRESENCE_RANGE)) { + s->state_machine->do_range_setup_if_necessary(); + // Check client request range header if we cached a stealed content with cacheable=false + } s->cache_info.action = CACHE_DO_SERVE_AND_DELETE; s->next_action = SM_ACTION_SERVE_FROM_CACHE; }