Bug 2728 regression: assertion failed: http.cc:705: "!eof"
Catch the zero size reply edge case again.
// sanity check the start line to see if this is in fact an HTTP message
if (!sanityCheckStartLine(buf, hdr_len, error)) {
- // NP: sanityCheck sets *error and sends debug warnings.
+ // NP: sanityCheck sets *error and sends debug warnings on syntax errors.
+ // if we have seen the connection close, this is an error too
+ if (eof && *error==HTTP_STATUS_NONE)
+ *error = HTTP_INVALID_HEADER;
+
return false;
}