};
-# ifdef USE_SSL
+#ifdef USE_SSL
/*
* HTTP-proxyed FTPS protocol handler.
*/
PORT_FTPS, /* defport */
PROT_HTTP /* protocol */
};
-# endif
+#endif
#endif
/* Unless we have asked to tunnel ftp operations through the proxy, we
switch and use HTTP operations only */
#ifndef CURL_DISABLE_HTTP
- if (conn->handler == &Curl_handler_ftp)
- conn->handler = &Curl_handler_ftp_proxy;
- else
- conn->handler = &Curl_handler_ftps_proxy;
+ if (conn->handler == &Curl_handler_ftp)
+ conn->handler = &Curl_handler_ftp_proxy;
+ else {
+#ifdef USE_SSL
+ conn->handler = &Curl_handler_ftps_proxy;
+#else
+ failf(data, "FTPS not supported!");
+ return CURLE_UNSUPPORTED_PROTOCOL;
+#endif
+ }
+
#else
failf(data, "FTP over http proxy requires HTTP support built-in!");
return CURLE_UNSUPPORTED_PROTOCOL;
*/
static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done);
+#ifdef USE_SSL
static int Curl_https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks);
+#endif
/*
* HTTP handler interface.
* Protocol table.
*/
-static const struct Curl_handler * protocols[] = {
+static const struct Curl_handler * const protocols[] = {
#ifndef CURL_DISABLE_HTTP
&Curl_handler_http,
static CURLcode setup_connection_internals(struct SessionHandle *data,
struct connectdata *conn)
{
- const struct Curl_handler * * pp;
+ const struct Curl_handler * const * pp;
const struct Curl_handler * p;
CURLcode result;
/* Scan protocol handler table. */
- for (pp = protocols; p = *pp; pp++)
+ for (pp = protocols; (p = *pp) != NULL; pp++)
if (strequal(p->scheme, conn->protostr)) {
/* Protocol found in table. Perform setup complement if some. */
conn->handler = p;