]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: server: Recreate connection IO after streams change.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 9 Feb 2018 22:57:29 +0000 (23:57 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 16 Feb 2018 12:54:56 +0000 (13:54 +0100)
src/lib-http/http-server-connection.c

index 2f355d35d994c98611a89f8e3b6406818be9e0e0..c045d03709cd36b41f1b8d5f5f5041a300472f30 100644 (file)
@@ -397,6 +397,7 @@ http_server_connection_ssl_init(struct http_server_connection *conn)
        if (conn->server->set.debug)
                http_server_connection_debug(conn, "Starting SSL handshake");
 
+       http_server_connection_input_halt(conn);
        if (master_service_ssl_init(master_service,
                                &conn->conn.input, &conn->conn.output,
                                &conn->ssl_iostream, &error) < 0) {
@@ -404,6 +405,8 @@ http_server_connection_ssl_init(struct http_server_connection *conn)
                        "Couldn't initialize SSL server for %s: %s", conn->conn.name, error);
                return -1;
        }
+       http_server_connection_input_resume(conn);
+
        if (ssl_iostream_handshake(conn->ssl_iostream) < 0) {
                http_server_connection_error(conn,"SSL handshake failed: %s",
                        ssl_iostream_get_last_error(conn->ssl_iostream));