version 1.123, 2014/07/05 09:20:54 |
version 1.124, 2014/07/11 03:31:52 |
|
|
ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n" |
ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n" |
"Proxy-Authorization: Basic %s%s\r\n%s\r\n\r\n", |
"Proxy-Authorization: Basic %s%s\r\n%s\r\n\r\n", |
epath, credentials, buf ? buf : "", |
epath, credentials, buf ? buf : "", |
HTTP_USER_AGENT); |
httpuseragent); |
else |
else |
ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n%s%s\r\n\r\n", |
ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n%s%s\r\n\r\n", |
epath, buf ? buf : "", HTTP_USER_AGENT); |
epath, buf ? buf : "", httpuseragent); |
|
|
} else { |
} else { |
#ifndef SMALL |
#ifndef SMALL |
|
|
ftp_printf(fin, ssl, ":%s", port); |
ftp_printf(fin, ssl, ":%s", port); |
#endif /* !SMALL */ |
#endif /* !SMALL */ |
ftp_printf(fin, ssl, "\r\n%s%s\r\n\r\n", |
ftp_printf(fin, ssl, "\r\n%s%s\r\n\r\n", |
buf ? buf : "", HTTP_USER_AGENT); |
buf ? buf : "", httpuseragent); |
if (verbose) |
if (verbose) |
fprintf(ttyout, "\n"); |
fprintf(ttyout, "\n"); |
} |
} |
|
|
char *cp, *url, *host, *dir, *file, *portnum; |
char *cp, *url, *host, *dir, *file, *portnum; |
char *username, *pass, *pathstart; |
char *username, *pass, *pathstart; |
char *ftpproxy, *httpproxy; |
char *ftpproxy, *httpproxy; |
|
#ifndef SMALL |
|
char *uagent = NULL; |
|
#endif /* !SMALL */ |
int rval, xargc; |
int rval, xargc; |
volatile int argpos; |
volatile int argpos; |
int dirhasglob, filehasglob, oautologin; |
int dirhasglob, filehasglob, oautologin; |
|
|
if ((httpproxy = getenv(HTTP_PROXY)) != NULL && *httpproxy == '\0') |
if ((httpproxy = getenv(HTTP_PROXY)) != NULL && *httpproxy == '\0') |
httpproxy = NULL; |
httpproxy = NULL; |
|
|
|
if (httpuseragent == NULL) |
|
httpuseragent = HTTP_USER_AGENT; |
|
#ifndef SMALL |
|
else |
|
uagent = httpuseragent; |
|
#endif /* !SMALL */ |
|
|
/* |
/* |
* Loop through as long as there's files to fetch. |
* Loop through as long as there's files to fetch. |
*/ |
*/ |
|
|
} |
} |
if (connected && rval != -1) |
if (connected && rval != -1) |
disconnect(0, NULL); |
disconnect(0, NULL); |
|
#ifndef SMALL |
|
free(uagent); |
|
#endif /* !SMALL */ |
return (rval); |
return (rval); |
} |
} |
|
|