]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm-http: Fixed crash when no authentication was configured.
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 3 Mar 2016 09:53:05 +0000 (11:53 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 3 Mar 2016 11:11:33 +0000 (13:11 +0200)
src/doveadm/client-connection-http.c

index d13dadd4b9986603855cd32d7d2f72d72a11524a..6f7aaa277ad5906b1a07d4805697e3eabaffb781 100644 (file)
@@ -640,7 +640,7 @@ doveadm_http_server_authorize_request(struct client_connection_http *conn)
        /* no authentication specified */
        if (doveadm_settings->doveadm_api_key[0] == '\0' &&
                *conn->client.set->doveadm_password == '\0') {
-               http_server_request_fail_close(conn->http_server_request, 500, "Internal Server Error");
+               conn->http_response = http_server_response_create(conn->http_server_request, 500, "Internal Server Error");
                i_error("No authentication defined in configuration. Add API key or password");
                return FALSE;
        }