if(result)
goto out;
}
+ }
#endif /* !CURL_DISABLE_HTTP */
+
+ /* HAProxy protocol comes *before* SSL, see #10165 */
+ if(data->set.haproxyprotocol) {
+ result = Curl_conn_haproxy_add(data, conn, sockindex);
+ if(result)
+ goto out;
}
#endif /* !CURL_DISABLE_PROXY */
(void)ssl_mode;
#endif /* USE_SSL */
-#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
- if(data->set.haproxyprotocol) {
- result = Curl_conn_haproxy_add(data, conn, sockindex);
- if(result)
- goto out;
- }
-#endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */
-
}
DEBUGASSERT(conn->cfilter[sockindex]);
cf = data->conn->cfilter[sockindex];
return result;
}
+#endif /* !CURL_DISABLE_PROXY &6 ! CURL_DISABLE_HTTP */
+
+#if !defined(CURL_DISABLE_PROXY)
static CURLcode send_haproxy_header(struct Curl_cfilter*cf,
struct Curl_easy *data)
return result;
}
-#endif /* !CURL_DISABLE_PROXY &6 ! CURL_DISABLE_HTTP */
+#endif /* !CURL_DISABLE_PROXY */
#include "curl_setup.h"
#include "urldata.h"
-#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
+#if !defined(CURL_DISABLE_PROXY)
+#if !defined(CURL_DISABLE_HTTP)
/* Default proxy timeout in milliseconds */
#define PROXY_TIMEOUT (3600*1000)
CURLcode Curl_conn_http_proxy_add(struct Curl_easy *data,
struct connectdata *conn,
int sockindex);
+#endif /* !CURL_DISABLE_HTTP */
CURLcode Curl_conn_haproxy_add(struct Curl_easy *data,
struct connectdata *conn,
int sockindex);
-#endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */
+#endif /* !CURL_DISABLE_PROXY */
#endif /* HEADER_CURL_HTTP_PROXY_H */