diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-04 13:38:05 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-04 13:38:05 +0100 |
commit | a36c70a6e354b4c7baf4047ed7db01a3ff76080c (patch) | |
tree | ab60dac9beb21e0f174aca9ba2354bf3e42fe2e5 | |
parent | 1422733ad4e5e1bf9ca3559ab680daa8e6629a85 (diff) | |
download | rspamd-a36c70a6e354b4c7baf4047ed7db01a3ff76080c.tar.gz rspamd-a36c70a6e354b4c7baf4047ed7db01a3ff76080c.zip |
[Minor] Set correct HTTP method when proxying connections
-rw-r--r-- | src/rspamd_proxy.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index a4e98a075..4bdfd56d9 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -1399,8 +1399,6 @@ proxy_open_mirror_connections (struct rspamd_proxy_session *session) continue; } - msg->method = HTTP_GET; - if (msg->url->len == 0) { msg->url = rspamd_fstring_append (msg->url, "/check", strlen ("/check")); } @@ -1432,6 +1430,7 @@ proxy_open_mirror_connections (struct rspamd_proxy_session *session) rspamd_http_message_add_header (msg, "File", session->fname); } + msg->method = HTTP_GET; rspamd_http_connection_write_message_shared (bk_conn->backend_conn, msg, NULL, NULL, bk_conn, bk_conn->backend_sock, @@ -1442,6 +1441,8 @@ proxy_open_mirror_connections (struct rspamd_proxy_session *session) rspamd_http_message_set_body (msg, session->map, session->map_len); } + msg->method = HTTP_POST; + if (m->compress) { proxy_request_compress (msg); @@ -1857,6 +1858,8 @@ retry: rspamd_http_message_add_header (msg, "File", session->fname); } + msg->method = HTTP_GET; + rspamd_http_connection_write_message_shared ( session->master_conn->backend_conn, msg, NULL, NULL, session->master_conn, @@ -1869,6 +1872,8 @@ retry: session->map, session->map_len); } + msg->method = HTTP_POST; + if (backend->compress) { proxy_request_compress (msg); if (session->client_milter_conn) { |