Do not check for flags.headers_parsed. The removed check was:
- misplaced: connection-related conditions such as eof must be checked first;
- wasteful: we never call persistentConnStatus() unless we parsed headers.
Moreover, calling persistentConnStatus() before we parse headers would trigger
and assertion because the method uses virginReply() which does not exist until
the headers are parsed.
const HttpReply *vrep = virginReply();
debugs(11, 5, "persistentConnStatus: content_length=" << vrep->content_length);
- /* If we haven't seen the end of reply headers, we are not done */
- debugs(11, 5, "persistentConnStatus: flags.headers_parsed=" << flags.headers_parsed);
-
- if (!flags.headers_parsed)
- return INCOMPLETE_MSG;
-
if (eof) // already reached EOF
return COMPLETE_NONPERSISTENT_MSG;