Commit f1d8547b authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Fix stall when TLS follows after proxy protocol

This fixes that nghttpx stalls when TLS handshake and data follow
after proxy protocol header and no extra read notification is
triggered (e.g., just small 1 HTTP request).
parent 7b46edb4
...@@ -108,7 +108,8 @@ void RateLimit::stopw() { ...@@ -108,7 +108,8 @@ void RateLimit::stopw() {
} }
void RateLimit::handle_tls_pending_read() { void RateLimit::handle_tls_pending_read() {
if (!conn_ || !conn_->tls.ssl || !conn_->tls.initial_handshake_done || if (!conn_ || !conn_->tls.ssl ||
(conn_->tls.rbuf.rleft() == 0 && !conn_->tls.initial_handshake_done) ||
(SSL_pending(conn_->tls.ssl) == 0 && conn_->tls.rbuf.rleft() == 0 && (SSL_pending(conn_->tls.ssl) == 0 && conn_->tls.rbuf.rleft() == 0 &&
conn_->tls.earlybuf.rleft() == 0)) { conn_->tls.earlybuf.rleft() == 0)) {
return; return;
......
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