From 67e4ad1a21735450f3fcdac77942bc271d5e94ee Mon Sep 17 00:00:00 2001 From: Zizhong Zhang Date: Tue, 13 Mar 2018 17:18:20 -0700 Subject: [PATCH] Fixing 404 on redirects This is a bug introduced with PR #2335. The `if` is to avoid unnecessary works when buffering the post body, but since redirects also need to execute the logic flow and the request info may be changed during the process of redirects. We need to extract the request info every time redirects happen. --- proxy/http/HttpTransact.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 9af7900ccc9..6085b1b236a 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -1123,7 +1123,7 @@ HttpTransact::HandleRequest(State *s) { TxnDebug("http_trans", "START HttpTransact::HandleRequest"); - if (!s->request_data.hdr) { + if (!s->state_machine->is_waiting_for_full_body) { ink_assert(!s->hdr_info.server_request.valid()); HTTP_INCREMENT_DYN_STAT(http_incoming_requests_stat);