From cf8308a8f10a165392350f7690a3839f48b7c3a0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 5 May 2015 15:28:20 +0100 Subject: [PATCH] Use default backend if no other backends specified. --- src/http_proxy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/http_proxy.c b/src/http_proxy.c index 66e03c8f1..12df0492b 100644 --- a/src/http_proxy.c +++ b/src/http_proxy.c @@ -294,6 +294,10 @@ proxy_client_finish_handler (struct rspamd_http_connection *conn, } else { backend = g_hash_table_lookup (session->ctx->upstreams, host); + + if (backend == NULL) { + backend = session->ctx->default_upstream; + } } if (backend == NULL) { @@ -409,7 +413,6 @@ void start_http_proxy (struct rspamd_worker *worker) { struct http_proxy_ctx *ctx = worker->ctx; - GError *err = NULL; ctx->ev_base = rspamd_prepare_worker (worker, "http_proxy", proxy_accept_socket); -- 2.39.5