Commit 2ca1ba9f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Deal with 0 length HTTP data write case

parent 8affef10
...@@ -584,7 +584,7 @@ int Client::write_quic() { ...@@ -584,7 +584,7 @@ int Client::write_quic() {
} }
continue; continue;
case NGTCP2_ERR_WRITE_MORE: case NGTCP2_ERR_WRITE_MORE:
assert(ndatalen > 0); assert(ndatalen >= 0);
if (s->add_write_offset(stream_id, ndatalen) != 0) { if (s->add_write_offset(stream_id, ndatalen) != 0) {
return -1; return -1;
} }
...@@ -593,7 +593,7 @@ int Client::write_quic() { ...@@ -593,7 +593,7 @@ int Client::write_quic() {
quic.last_error = quic::err_transport(nwrite); quic.last_error = quic::err_transport(nwrite);
return -1; return -1;
} else if (ndatalen > 0 && s->add_write_offset(stream_id, ndatalen) != 0) { } else if (ndatalen >= 0 && s->add_write_offset(stream_id, ndatalen) != 0) {
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment