SPDY improvements

This commit is contained in:
Unbit
2013-01-25 17:38:42 +01:00
parent 7adcb19d1a
commit 2acd338429
4 changed files with 43 additions and 14 deletions
+3
View File
@@ -311,12 +311,15 @@ ssize_t hr_ssl_read(struct corerouter_peer *main_peer) {
// try to always leave 4k available
if (uwsgi_buffer_ensure(main_peer->in, uwsgi.page_size)) return -1;
uwsgi_log("REMAINS: %llu\n", (unsigned long long) main_peer->in->len - main_peer->in->pos);
int ret = SSL_read(hr->ssl, main_peer->in->buf + main_peer->in->pos, main_peer->in->len - main_peer->in->pos);
uwsgi_log("ret = %d\n", ret);
if (ret > 0) {
// fix the buffer
main_peer->in->pos += ret;
// check for pending data
int ret2 = SSL_pending(hr->ssl);
uwsgi_log("ret2 = %d\n", ret2);
if (ret2 > 0) {
if (uwsgi_buffer_fix(main_peer->in, main_peer->in->len + ret2 )) {
uwsgi_log("[uwsgi-https] cannot fix the buffer to %d\n", main_peer->in->len + ret2);