1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-04 16:45:06 -05:00

http2: don't set KEEP_SEND when there's no more data to be sent

this should fix an issue where curl sometimes doesn't send out a request
with authorization info after a 401 is received over http2

Closes #6747
This commit is contained in:
Robert Ronto 2021-03-15 15:35:10 +01:00 committed by Daniel Stenberg
parent cc615f48e7
commit 068661bb02
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1446,13 +1446,15 @@ CURLcode Curl_http2_done_sending(struct Curl_easy *data,
H2BUGF(infof(data, "HTTP/2 still wants to send data (easy %p)\n", data));
/* re-set KEEP_SEND to make sure we are called again */
k->keepon |= KEEP_SEND;
/* and attempt to send the pending frames */
rv = h2_session_send(data, h2);
if(rv != 0)
result = CURLE_SEND_ERROR;
if(nghttp2_session_want_write(h2)) {
/* re-set KEEP_SEND to make sure we are called again */
k->keepon |= KEEP_SEND;
}
}
}
return result;