From 1bcdad3ef1b2039b1de8f078ee8671987d11f0f7 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 18 Sep 2025 12:00:05 +0200 Subject: [PATCH] Issue #2852 - Follow-up: Add comment and fix formatting. --- netwerk/protocol/http/nsHttpResponseHead.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/netwerk/protocol/http/nsHttpResponseHead.cpp b/netwerk/protocol/http/nsHttpResponseHead.cpp index 6bb328f823..4c3c2cd639 100644 --- a/netwerk/protocol/http/nsHttpResponseHead.cpp +++ b/netwerk/protocol/http/nsHttpResponseHead.cpp @@ -620,22 +620,22 @@ nsHttpResponseHead::ParseHeaderLine_locked(const nsACString &line, bool original // permit only a single value here. if (nsHttp::ParseInt64(val.get(), &ignored, &len)) { mContentLength = len; - } - else { + } else { // If this is a negative content length then just ignore it LOG(("invalid content-length! %s\n", val.get())); } - } - else if (hdr == nsHttp::Content_Type) { + } else if (hdr == nsHttp::Content_Type) { LOG(("ParseContentType [type=%s]\n", val.get())); bool dummy; net_ParseContentType(val, mContentType, mContentCharset, &dummy); - } - else if (hdr == nsHttp::Cache_Control) + } else if (hdr == nsHttp::Cache_Control) { + // Re-parse merged header in its entirety. See Issue #2852 ParseCacheControl(mHeaders.PeekHeader(hdr)); - else if (hdr == nsHttp::Pragma) + } else if (hdr == nsHttp::Pragma) { ParsePragma(val.get()); + } + return NS_OK; }