From: Stephan Bosch Date: Sun, 21 Jan 2018 15:06:19 +0000 (+0100) Subject: lib-http: client: Add "host" and "port" fields to request event. X-Git-Tag: 2.3.1~97 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0333014cdeb8c46b51580135d60b9b23a000bb6f;p=thirdparty%2Fdovecot%2Fcore.git lib-http: client: Add "host" and "port" fields to request event. --- diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index e0f9f89718..d575141b40 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -53,6 +53,8 @@ static void http_client_request_update_event(struct http_client_request *req) { event_add_str(req->event, "method", req->method); + event_add_str(req->event, "host", req->origin_url.host.name); + event_add_int(req->event, "port", http_url_get_port(&req->origin_url)); if (req->target != NULL) event_add_str(req->event, "target", req->target); event_set_append_log_prefix(req->event, t_strdup_printf( @@ -334,6 +336,7 @@ void http_client_request_set_port(struct http_client_request *req, { i_assert(req->state == HTTP_REQUEST_STATE_NEW); req->origin_url.port = port; + event_add_int(req->event, "port", port); } void http_client_request_set_ssl(struct http_client_request *req,