diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-20 23:11:43 +0900 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-05-20 22:43:37 +0200 |
commit | c175d184a2c254765d1a0d66978de4886b0a2ece (patch) | |
tree | b0ecd1de471f97d43e4ad41f59f196512ac9615e /tests/data/test1510 | |
parent | d5aab55b3353bec1d34a2e1434399d23db79b254 (diff) |
http2: Faster http2 upload
Previously, when we send all given buffer in data_source_callback, we
return NGHTTP2_ERR_DEFERRED, and nghttp2 library removes this stream
temporarily for writing. This itself is good. If this is the sole
stream in the session, nghttp2_session_want_write() returns zero,
which means that libcurl does not check writeability of the underlying
socket. This leads to very slow upload, because it seems curl only
upload 16k something per 1 second. To fix this, if we still have data
to send, call nghttp2_session_resume_data after nghttp2_session_send.
This makes nghttp2_session_want_write() returns nonzero (if connection
window still opens), and as a result, socket writeability is checked,
and upload speed becomes normal.
Diffstat (limited to 'tests/data/test1510')
0 files changed, 0 insertions, 0 deletions