It's not an HTTP error if the socket was closed by the protocol.
@@ -666,6 +666,8 @@ static int http1_on_body_chunk(http1_parser_s *parser, char *data,
/** called when a protocol error occurred. */
static int http1_on_error(http1_parser_s *parser) {
+ if (parser2http(parser)->close)
+ return -1;
FIO_LOG_DEBUG("HTTP parser error.");
fio_close(parser2http(parser)->p.uuid);
return -1;
