mirror of
https://github.com/jorisvink/kore
synced 2025-03-10 04:59:02 -04:00
Make sure we properly close a SPDY stream if there's no data.
This commit is contained in:
parent
b64f674db2
commit
7e8371366f
@ -306,7 +306,7 @@ http_response(struct http_request *req, int status, u_int8_t *d, u_int32_t len)
|
|||||||
kore_mem_free(htext);
|
kore_mem_free(htext);
|
||||||
|
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
req->stream->send_size = len;
|
req->stream->send_size += len;
|
||||||
spdy_frame_send(req->owner, SPDY_DATA_FRAME,
|
spdy_frame_send(req->owner, SPDY_DATA_FRAME,
|
||||||
0, len, req->stream, 0);
|
0, len, req->stream, 0);
|
||||||
net_send_queue(req->owner, d, len, req->stream);
|
net_send_queue(req->owner, d, len, req->stream);
|
||||||
|
@ -181,10 +181,13 @@ spdy_frame_send(struct connection *c, u_int16_t type, u_int8_t flags,
|
|||||||
break;
|
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;
|
s->flags |= SPDY_KORE_FIN;
|
||||||
|
net_send_queue(c, nb, length, s);
|
||||||
net_send_queue(c, nb, length, NULL);
|
} else {
|
||||||
|
net_send_queue(c, nb, length, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct spdy_stream *
|
struct spdy_stream *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user