aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/http.c')
-rw-r--r--src/libutil/http.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c
index fef9cb73c..fc8263ddd 100644
--- a/src/libutil/http.c
+++ b/src/libutil/http.c
@@ -1204,8 +1204,14 @@ rspamd_http_connection_copy_msg (struct rspamd_http_connection *conn)
}
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) {
@@ -2391,6 +2397,21 @@ rspamd_http_connection_set_key (struct rspamd_http_connection *conn,
priv->local_key = rspamd_keypair_ref (key);
}
+const struct rspamd_cryptobox_pubkey*
+rspamd_http_connection_get_peer_key (struct rspamd_http_connection *conn)
+{
+ struct rspamd_http_connection_private *priv = conn->priv;
+
+ if (priv->peer_key) {
+ return priv->peer_key;
+ }
+ else if (priv->msg) {
+ return priv->msg->peer_key;
+ }
+
+ return NULL;
+}
+
gboolean
rspamd_http_connection_is_encrypted (struct rspamd_http_connection *conn)
{