From 1c2fcc2a55d5857883d13b91bd6dd4ede9e5e022 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 17 Sep 2015 22:26:49 +0900 Subject: [PATCH] nghttpx: Handle SSL/TLS data following PROXY protocol line --- src/shrpx_client_handler.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shrpx_client_handler.cc b/src/shrpx_client_handler.cc index c9dd67be..0f31897b 100644 --- a/src/shrpx_client_handler.cc +++ b/src/shrpx_client_handler.cc @@ -872,6 +872,11 @@ ssize_t parse_proxy_line_port(const uint8_t *first, const uint8_t *last) { } // namespace int ClientHandler::on_proxy_protocol_finish() { + if (conn_.tls.ssl) { + conn_.tls.rbuf.append(rb_.pos, rb_.rleft()); + rb_.reset(); + } + setup_upstream_io_callback(); // Run on_read to process data left in buffer since they are not