Branch: Tag:


2018-06-13 14:20:24 by Henrik Grubbström (Grubba) <>

Testsuite [WebDAV]: Use keep-alive.

Fixes multiple issues on Solaris with the WebDAV testsuite.

* Support multiple Protocol objects for the same URL
(on Solaris there is one Protocol object each for IPv4 and IPv4).

* Fixed some failures "I/O error: Address already in use", by
using HTTP keep-alive for the WebDAV requests.
These failures were in part due to Solaris holding closed TCP
connections in TIME_WAIT for 4 minutes (Linux 2 minutes).

* Also a workaround for Protocols.HTTP.Query not handling the
HEAD method in keep-alive replies.

13:    foreach(conf->registered_urls, string full_url) {    mapping(string:string|Configuration|array(Protocol)) port_info =    roxen.urls[full_url]; +  DAV_WERROR("full url: %O\n" +  "port_info: %O\n", +  full_url, port_info);    if (!test_true(mappingp, port_info)) continue;    array(Protocol) ports = port_info->ports;    if (!test_true(arrayp, ports)) continue;
24:       if (!test_true(mappingp, prot->urls)) continue;    +  DAV_WERROR("prot: %O\n" +  "prot->urls: %O\n", prot, prot->urls); +     // Strip the fragment from the full_url.    string url = (full_url/"#")[0];    mapping(string:mixed) url_data = prot->urls[url];    if (!test_true(mappingp, url_data)) continue;    -  report_debug("url data: %O\n", url_data); +  // NB: url_data is typically the same mapping as port_info. +  DAV_WERROR("url data: %O\n", url_data);    test_true(`==, url_data->conf, conf); -  test_true(`==, url_data->port, prot); +     test_true(stringp, url_data->hostname);    test_true(stringp, url_data->path || "/");