]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: support verbose conncache closure handle
authorJay Satiro <raysatiro@yahoo.com>
Tue, 26 Feb 2019 07:17:03 +0000 (02:17 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 5 Mar 2019 05:00:01 +0000 (00:00 -0500)
- Change closure handle to receive verbose setting from the easy handle
  most recently added via curl_multi_add_handle.

The closure handle is a special easy handle used for closing cached
connections. It receives limited settings from the easy handle most
recently added to the multi handle. Prior to this change that did not
include verbose which was a problem because on connection shutdown
verbose mode was not acknowledged.

Ref: https://github.com/curl/curl/pull/3598

Co-authored-by: Daniel Stenberg
Closes https://github.com/curl/curl/pull/3618

lib/multi.c
tests/data/test1506

index c7f362dbf2cd0ea3a82a1bb57ba43d5b422f7bd6..3ebd73aa1df636a897b4eab8dd6db769046bbe32 100644 (file)
@@ -497,6 +497,8 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi,
     data->set.server_response_timeout;
   data->state.conn_cache->closure_handle->set.no_signal =
     data->set.no_signal;
+  data->state.conn_cache->closure_handle->set.verbose =
+    data->set.verbose;
 
   update_timer(multi);
   return CURLM_OK;
index 815fef9233b0c2517997a7df7dfb99cfebe8860e..7377dd6e0160349716ec5ae66c8e02a02acd30a3 100644 (file)
@@ -88,9 +88,13 @@ Accept: */*
 * Connection #2 to host server3.example.com left intact
 * Closing connection 0
 * Connection #3 to host server4.example.com left intact
+* Closing connection
+* Closing connection
+* Closing connection
 </file>
 <stripfile>
 $_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+s/^(\* Closing connection) [123](?=\r?\n)/$1/
 </stripfile>
 </verify>
 </testcase>