]> source.dussan.org Git - rspamd.git/commitdiff
[Project] Adopt lua libraries for http context
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 Feb 2019 17:56:59 +0000 (17:56 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 Feb 2019 17:56:59 +0000 (17:56 +0000)
src/lua/lua_dns_resolver.c
src/lua/lua_http.c

index 362a6b35e1a9f8b338a5ce0dd6183210bc61a34c..b68e1539704ca37d49c2fdd6030b252f6571abc2 100644 (file)
@@ -301,6 +301,8 @@ lua_push_dns_reply (lua_State *L, const struct rdns_reply *reply)
 
                                lua_rawseti (L, -2, ++i);
                                break;
+                       default:
+                               continue;
                        }
                }
                lua_pushnil (L);
index 2ca01d8a5b28f46bda3d2f192778e94f037cf43d..8c3dfb9291d31b69159d759f26db479a3edb6d22 100644 (file)
@@ -379,23 +379,22 @@ lua_http_make_connection (struct lua_http_cbdata *cbd)
        cbd->fd = fd;
 
        if (cbd->cfg) {
-               cbd->conn = rspamd_http_connection_new (NULL,
+               cbd->conn = rspamd_http_connection_new (
+                               NULL,
+                               NULL,
                                lua_http_error_handler,
                                lua_http_finish_handler,
                                RSPAMD_HTTP_CLIENT_SIMPLE,
-                               RSPAMD_HTTP_CLIENT,
-                               NULL,
-                               (cbd->flags & RSPAMD_LUA_HTTP_FLAG_NOVERIFY) ?
-                               cbd->cfg->libs_ctx->ssl_ctx_noverify : cbd->cfg->libs_ctx->ssl_ctx);
+                               RSPAMD_HTTP_CLIENT);
        }
        else {
-               cbd->conn = rspamd_http_connection_new (NULL,
+               cbd->conn = rspamd_http_connection_new (
+                               NULL,
+                               NULL,
                                lua_http_error_handler,
                                lua_http_finish_handler,
                                RSPAMD_HTTP_CLIENT_SIMPLE,
-                               RSPAMD_HTTP_CLIENT,
-                               NULL,
-                               NULL);
+                               RSPAMD_HTTP_CLIENT);
        }
 
        if (cbd->conn) {