Loading lib/ftp.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -3587,7 +3587,7 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep) if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) { if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) { /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port aren't used so we blank their arguments. TODO: make this nicer */ aren't used so we blank their arguments. TODO: make this nicer */ result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0, FALSE); result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0); return result; return result; } } Loading lib/http_proxy.c +6 −14 Original line number Original line Diff line number Diff line Loading @@ -122,8 +122,7 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) remote_port = conn->conn_to_port; remote_port = conn->conn_to_port; else else remote_port = conn->remote_port; remote_port = conn->remote_port; result = Curl_proxyCONNECT(conn, sockindex, hostname, result = Curl_proxyCONNECT(conn, sockindex, hostname, remote_port); remote_port, FALSE); conn->data->req.protop = prot_save; conn->data->req.protop = prot_save; if(CURLE_OK != result) if(CURLE_OK != result) return result; return result; Loading @@ -140,16 +139,12 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This * function will issue the necessary commands to get a seamless tunnel through * function will issue the necessary commands to get a seamless tunnel through * this proxy. After that, the socket can be used just as a normal socket. * this proxy. After that, the socket can be used just as a normal socket. * * 'blocking' set to TRUE means that this function will do the entire CONNECT * + response in a blocking fashion. Should be avoided! */ */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, CURLcode Curl_proxyCONNECT(struct connectdata *conn, int sockindex, int sockindex, const char *hostname, const char *hostname, int remote_port, int remote_port) bool blocking) { { int subversion=0; int subversion=0; struct Curl_easy *data=conn->data; struct Curl_easy *data=conn->data; Loading Loading @@ -289,13 +284,10 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return CURLE_RECV_ERROR; return CURLE_RECV_ERROR; } } if(!blocking) { if(!Curl_conn_data_pending(conn, sockindex)) if(!Curl_conn_data_pending(conn, sockindex)) /* return so we'll be called again polling-style */ /* return so we'll be called again polling-style */ return CURLE_OK; return CURLE_OK; DEBUGF(infof(data, DEBUGF(infof(data, "Read response immediately from proxy CONNECT\n")); "Read response immediately from proxy CONNECT\n")); } /* at this point, the tunnel_connecting phase is over. */ /* at this point, the tunnel_connecting phase is over. */ Loading lib/http_proxy.h +2 −3 Original line number Original line Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____| * * * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * * This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms Loading @@ -26,8 +26,7 @@ /* ftp can use this as well */ /* ftp can use this as well */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, CURLcode Curl_proxyCONNECT(struct connectdata *conn, int tunnelsocket, int tunnelsocket, const char *hostname, int remote_port, const char *hostname, int remote_port); bool blocking); /* Default proxy timeout in milliseconds */ /* Default proxy timeout in milliseconds */ #define PROXY_TIMEOUT (3600*1000) #define PROXY_TIMEOUT (3600*1000) Loading Loading
lib/ftp.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -3587,7 +3587,7 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep) if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) { if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) { /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port aren't used so we blank their arguments. TODO: make this nicer */ aren't used so we blank their arguments. TODO: make this nicer */ result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0, FALSE); result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0); return result; return result; } } Loading
lib/http_proxy.c +6 −14 Original line number Original line Diff line number Diff line Loading @@ -122,8 +122,7 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) remote_port = conn->conn_to_port; remote_port = conn->conn_to_port; else else remote_port = conn->remote_port; remote_port = conn->remote_port; result = Curl_proxyCONNECT(conn, sockindex, hostname, result = Curl_proxyCONNECT(conn, sockindex, hostname, remote_port); remote_port, FALSE); conn->data->req.protop = prot_save; conn->data->req.protop = prot_save; if(CURLE_OK != result) if(CURLE_OK != result) return result; return result; Loading @@ -140,16 +139,12 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This * function will issue the necessary commands to get a seamless tunnel through * function will issue the necessary commands to get a seamless tunnel through * this proxy. After that, the socket can be used just as a normal socket. * this proxy. After that, the socket can be used just as a normal socket. * * 'blocking' set to TRUE means that this function will do the entire CONNECT * + response in a blocking fashion. Should be avoided! */ */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, CURLcode Curl_proxyCONNECT(struct connectdata *conn, int sockindex, int sockindex, const char *hostname, const char *hostname, int remote_port, int remote_port) bool blocking) { { int subversion=0; int subversion=0; struct Curl_easy *data=conn->data; struct Curl_easy *data=conn->data; Loading Loading @@ -289,13 +284,10 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return CURLE_RECV_ERROR; return CURLE_RECV_ERROR; } } if(!blocking) { if(!Curl_conn_data_pending(conn, sockindex)) if(!Curl_conn_data_pending(conn, sockindex)) /* return so we'll be called again polling-style */ /* return so we'll be called again polling-style */ return CURLE_OK; return CURLE_OK; DEBUGF(infof(data, DEBUGF(infof(data, "Read response immediately from proxy CONNECT\n")); "Read response immediately from proxy CONNECT\n")); } /* at this point, the tunnel_connecting phase is over. */ /* at this point, the tunnel_connecting phase is over. */ Loading
lib/http_proxy.h +2 −3 Original line number Original line Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____| * * * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * * This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms Loading @@ -26,8 +26,7 @@ /* ftp can use this as well */ /* ftp can use this as well */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, CURLcode Curl_proxyCONNECT(struct connectdata *conn, int tunnelsocket, int tunnelsocket, const char *hostname, int remote_port, const char *hostname, int remote_port); bool blocking); /* Default proxy timeout in milliseconds */ /* Default proxy timeout in milliseconds */ #define PROXY_TIMEOUT (3600*1000) #define PROXY_TIMEOUT (3600*1000) Loading