version 1.150, 2016/12/08 19:31:17 |
version 1.151, 2016/12/08 19:59:51 |
|
|
fin = fdopen(s, "r+"); |
fin = fdopen(s, "r+"); |
#endif /* !SMALL */ |
#endif /* !SMALL */ |
|
|
if (verbose) |
|
fprintf(ttyout, "Requesting %s", origline); |
|
|
|
/* |
/* |
* Construct and send the request. Proxy requests don't want leading /. |
* Construct and send the request. Proxy requests don't want leading /. |
*/ |
*/ |
|
|
|
|
epath = url_encode(path); |
epath = url_encode(path); |
if (proxyurl) { |
if (proxyurl) { |
if (verbose) |
if (verbose) { |
fprintf(ttyout, " (via %s)\n", proxyurl); |
fprintf(ttyout, "Requesting %s (via %s)\n", |
|
origline, proxyurl); |
|
} |
/* |
/* |
* Host: directive must use the destination host address for |
* Host: directive must use the destination host address for |
* the original URI (path). |
* the original URI (path). |
|
|
"Host: %s\r\n%s%s\r\n\r\n", |
"Host: %s\r\n%s%s\r\n\r\n", |
epath, proxyhost, buf ? buf : "", httpuseragent); |
epath, proxyhost, buf ? buf : "", httpuseragent); |
} else { |
} else { |
|
if (verbose) |
|
fprintf(ttyout, "Requesting %s\n", origline); |
#ifndef SMALL |
#ifndef SMALL |
if (resume) { |
if (resume) { |
struct stat stbuf; |
struct stat stbuf; |
|
|
#endif /* !SMALL */ |
#endif /* !SMALL */ |
ftp_printf(fin, tls, "\r\n%s%s\r\n\r\n", |
ftp_printf(fin, tls, "\r\n%s%s\r\n\r\n", |
buf ? buf : "", httpuseragent); |
buf ? buf : "", httpuseragent); |
if (verbose) |
|
fprintf(ttyout, "\n"); |
|
} |
} |
free(epath); |
free(epath); |
|
|