mirror of
https://github.com/curl/curl.git
synced 2026-07-27 23:53:06 +03:00
Peter O'Gorman found a problem with SCP downloads when the downloaded file
was 16385 bytes (16K+1) and it turned out we didn't properly always "suck out" all data from libssh2. The effect being that libcurl would hang on the socket waiting for data when libssh2 had in fact already read it all...
This commit is contained in:
parent
f213d0db98
commit
b4d3c4a76c
3 changed files with 14 additions and 3 deletions
|
|
@ -270,7 +270,10 @@ CURLcode Curl_readrewind(struct connectdata *conn)
|
|||
|
||||
static int data_pending(struct connectdata *conn)
|
||||
{
|
||||
return Curl_ssl_data_pending(conn, FIRSTSOCKET);
|
||||
/* in the case of libssh2, we can never be really sure that we have emptied
|
||||
its internal buffers so we MUST always try until we get EAGAIN back */
|
||||
return conn->protocol&(PROT_SCP|PROT_SFTP) ||
|
||||
Curl_ssl_data_pending(conn, FIRSTSOCKET);
|
||||
}
|
||||
|
||||
#ifndef MIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue