version 1.176, 2019/11/03 19:26:15 |
version 1.177, 2019/11/04 15:36:36 |
|
|
#include "cmds.h" |
#include "cmds.h" |
|
|
static int url_get(const char *, const char *, const char *, int); |
static int url_get(const char *, const char *, const char *, int); |
void aborthttp(int); |
static void aborthttp(int); |
void abortfile(int); |
static void abortfile(int); |
char hextochar(const char *); |
static char hextochar(const char *); |
char *urldecode(const char *); |
static char *urldecode(const char *); |
char *recode_credentials(const char *_userinfo); |
static char *recode_credentials(const char *_userinfo); |
char *ftp_readline(FILE *, size_t *); |
static char *ftp_readline(FILE *, size_t *); |
void ftp_close(FILE **fin, struct tls **tls, volatile int *fd); |
static void ftp_close(FILE **, struct tls **, volatile int *); |
const char *sockerror(struct tls *); |
static const char *sockerror(struct tls *); |
#ifndef NOSSL |
#ifndef NOSSL |
int proxy_connect(int, char *, char *); |
static int proxy_connect(int, char *, char *); |
int stdio_tls_write_wrapper(void *, const char *, int); |
static int stdio_tls_write_wrapper(void *, const char *, int); |
int stdio_tls_read_wrapper(void *, char *, int); |
static int stdio_tls_read_wrapper(void *, char *, int); |
#endif /* !NOSSL */ |
#endif /* !NOSSL */ |
|
|
#define FTP_URL "ftp://" /* ftp URL prefix */ |
#define FTP_URL "ftp://" /* ftp URL prefix */ |
|
|
static const char at_encoding_warning[] = |
static const char at_encoding_warning[] = |
"Extra `@' characters in usernames and passwords should be encoded as %%40"; |
"Extra `@' characters in usernames and passwords should be encoded as %%40"; |
|
|
jmp_buf httpabort; |
static jmp_buf httpabort; |
|
|
static int redirect_loop; |
static int redirect_loop; |
static int retried; |
static int retried; |
|
|
* Abort a http retrieval |
* Abort a http retrieval |
*/ |
*/ |
/* ARGSUSED */ |
/* ARGSUSED */ |
void |
static void |
aborthttp(int signo) |
aborthttp(int signo) |
{ |
{ |
|
|
|
|
* Abort a http retrieval |
* Abort a http retrieval |
*/ |
*/ |
/* ARGSUSED */ |
/* ARGSUSED */ |
void |
static void |
abortfile(int signo) |
abortfile(int signo) |
{ |
{ |
|
|
|
|
return ret-reallen; |
return ret-reallen; |
} |
} |
|
|
char * |
static char * |
recode_credentials(const char *userinfo) |
recode_credentials(const char *userinfo) |
{ |
{ |
char *ui, *creds; |
char *ui, *creds; |
|
|
return (creds); |
return (creds); |
} |
} |
|
|
char |
static char |
hextochar(const char *str) |
hextochar(const char *str) |
{ |
{ |
unsigned char c, ret; |
unsigned char c, ret; |
|
|
return (0); |
return (0); |
} |
} |
|
|
char * |
static char * |
ftp_readline(FILE *fp, size_t *lenp) |
ftp_readline(FILE *fp, size_t *lenp) |
{ |
{ |
return fparseln(fp, lenp, NULL, "\0\0\0", 0); |
return fparseln(fp, lenp, NULL, "\0\0\0", 0); |
} |
} |
|
|
void |
static void |
ftp_close(FILE **fin, struct tls **tls, volatile int *fd) |
ftp_close(FILE **fin, struct tls **tls, volatile int *fd) |
{ |
{ |
#ifndef NOSSL |
#ifndef NOSSL |
|
|
} |
} |
} |
} |
|
|
const char * |
static const char * |
sockerror(struct tls *tls) |
sockerror(struct tls *tls) |
{ |
{ |
int save_errno = errno; |
int save_errno = errno; |
|
|
} |
} |
|
|
#ifndef NOSSL |
#ifndef NOSSL |
int |
static int |
proxy_connect(int socket, char *host, char *cookie) |
proxy_connect(int socket, char *host, char *cookie) |
{ |
{ |
int l; |
int l; |
|
|
return(200); |
return(200); |
} |
} |
|
|
int |
static int |
stdio_tls_write_wrapper(void *arg, const char *buf, int len) |
stdio_tls_write_wrapper(void *arg, const char *buf, int len) |
{ |
{ |
struct tls *tls = arg; |
struct tls *tls = arg; |
|
|
return ret; |
return ret; |
} |
} |
|
|
int |
static int |
stdio_tls_read_wrapper(void *arg, char *buf, int len) |
stdio_tls_read_wrapper(void *arg, char *buf, int len) |
{ |
{ |
struct tls *tls = arg; |
struct tls *tls = arg; |