mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUGF(infof(conn->data, "nread=%zd\n", nread));
|
|
||||||
|
|
||||||
if(nread == 0) {
|
if(nread == 0) {
|
||||||
failf(conn->data, "EOF");
|
failf(conn->data, "Unexpected EOF");
|
||||||
return 0;
|
*err = CURLE_RECV_ERROR;
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUGF(infof(conn->data, "nread=%zd\n", nread));
|
||||||
|
|
||||||
rv = nghttp2_session_mem_recv(httpc->h2,
|
rv = nghttp2_session_mem_recv(httpc->h2,
|
||||||
(const uint8_t *)httpc->inbuf, nread);
|
(const uint8_t *)httpc->inbuf, nread);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user