diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-05 15:28:20 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-05 15:28:20 +0100 |
commit | cf8308a8f10a165392350f7690a3839f48b7c3a0 (patch) | |
tree | f8b37a2a7c3a72321972af6254d17147abc90470 | |
parent | bae7ffc85e0d4c2cb3e13b4f1af92c1c9ba9c599 (diff) | |
download | rspamd-cf8308a8f10a165392350f7690a3839f48b7c3a0.tar.gz rspamd-cf8308a8f10a165392350f7690a3839f48b7c3a0.zip |
Use default backend if no other backends specified.
-rw-r--r-- | src/http_proxy.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |