http2: return recv error on unexpected EOF
Pointed-out-by: Tatsuhiro Tsujikawa Bug: http://curl.haxx.se/bug/view.cgi?id=1487
This commit is contained in:
parent
1514b718e3
commit
bc3a44aebc
@ -749,13 +749,14 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEBUGF(infof(conn->data, "nread=%zd\n", nread));
|
||||
|
||||
if(nread == 0) {
|
||||
failf(conn->data, "EOF");
|
||||
return 0;
|
||||
failf(conn->data, "Unexpected EOF");
|
||||
*err = CURLE_RECV_ERROR;
|
||||
return -1;
|
||||
}
|
||||
|
||||
DEBUGF(infof(conn->data, "nread=%zd\n", nread));
|
||||
|
||||
rv = nghttp2_session_mem_recv(httpc->h2,
|
||||
(const uint8_t *)httpc->inbuf, nread);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user