]> source.dussan.org Git - rspamd.git/commitdiff
Use default backend if no other backends specified.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 May 2015 14:28:20 +0000 (15:28 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 May 2015 14:28:20 +0000 (15:28 +0100)
src/http_proxy.c

index 66e03c8f14e5c8deccea383260ee718d12306c22..12df0492b03c36fd036c312d9c4eaa6d32d5b3c7 100644 (file)
@@ -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);