Branch: Tag:

2019-08-09

2019-08-09 08:34:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Protocols.HTTP [do_async_proxied_method]: Use the correct callback.

HTTP protocol failures ahould be reported on the request_ok()
callback. The request_fail() callback is for connection failures.

Fixes PIKE-198 (#8198) some more.

388:    mapping(string:string) request_headers,    string data)   { +  con->set_callbacks(@orig_cb_info);    if (con->status >= 300) {    // Proxy did not like us or failed to connect to the remote. -  https_proxy_connect_fail(con, orig_cb_info, url, method, -  query_variables, request_headers, -  data); +  // Return the failure message. +  if (con->request_ok) { +  con->request_ok(con, @con->extra_args); +  }    return;    } -  con->set_callbacks(@orig_cb_info); +        con->headers["connect"] = "keep-alive";    con->headers["content-length"] = "0";