Skip to content
Snippets Groups Projects
Commit 1a1e5be2 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

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] some more.
parent 977a0aae
No related branches found
No related tags found
No related merge requests found
......@@ -388,14 +388,15 @@ protected void https_proxy_connect_ok(Protocols.HTTP.Query con,
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";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment