}
if (msg->url) {
- new_msg->url = rspamd_fstring_new_init (msg->url->str,
- msg->url->len);
+ if (new_msg->url) {
+ new_msg->url = rspamd_fstring_append (new_msg->url, msg->url->str,
+ msg->url->len);
+ }
+ else {
+ new_msg->url = rspamd_fstring_new_init (msg->url->str,
+ msg->url->len);
+ }
}
if (msg->host) {
msg = rspamd_http_connection_copy_msg (session->client_conn);
rspamd_http_message_remove_header (msg, "Content-Length");
rspamd_http_message_remove_header (msg, "Key");
+ msg->method = HTTP_GET;
+
+ if (msg->url->len == 0) {
+ msg->url = rspamd_fstring_append (msg->url, "/check", strlen ("/check"));
+ }
if (m->settings_id != NULL) {
rspamd_http_message_remove_header (msg, "Settings-ID");