]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 12 Mar 2018 07:24:15 +0000 (09:24 +0200)
src/lib-http/http-server-connection.c

index 15a358f3313b0458dfd88ca39e93a311c0966665..c2e46483d53ff1ed0fef218510e886057fa2ab3c 100644 (file)
@@ -401,6 +401,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) {
@@ -408,6 +409,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));