Issue #2852 - Follow-up: Add comment and fix formatting.

This commit is contained in:
Moonchild 2025-09-18 12:00:05 +02:00 committed by roytam1
commit 1bcdad3ef1

View file

@ -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;
}