1
0
mirror of https://git.kore.io/kore.git synced 2024-11-05 18:11:44 +01:00

Make sure we properly close a SPDY stream if there's no data.

This commit is contained in:
Joris Vink 2014-01-14 22:22:26 +01:00
parent b64f674db2
commit 7e8371366f
2 changed files with 7 additions and 4 deletions

View File

@ -306,7 +306,7 @@ http_response(struct http_request *req, int status, u_int8_t *d, u_int32_t len)
kore_mem_free(htext);
if (len > 0) {
req->stream->send_size = len;
req->stream->send_size += len;
spdy_frame_send(req->owner, SPDY_DATA_FRAME,
0, len, req->stream, 0);
net_send_queue(req->owner, d, len, req->stream);

View File

@ -181,10 +181,13 @@ spdy_frame_send(struct connection *c, u_int16_t type, u_int8_t flags,
break;
}
if (s != NULL && type == SPDY_DATA_FRAME && (flags & FLAG_FIN))
if (s != NULL && type == SPDY_DATA_FRAME && (flags & FLAG_FIN)) {
s->send_size += length;
s->flags |= SPDY_KORE_FIN;
net_send_queue(c, nb, length, NULL);
net_send_queue(c, nb, length, s);
} else {
net_send_queue(c, nb, length, NULL);
}
}
struct spdy_stream *