X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=a5f5673c5f0cb935ec4570d916cd8f938004fa19;hp=b62a9821dc3af13bed5b705399d4b50e486ec8e9;hb=2447fb9a9b85083c1e6fa54d0a18bdf3962fab1f;hpb=40fc711db6ebc891e41f15d2052847432e991a21 diff --git a/src/http.c b/src/http.c index b62a9821..a5f5673c 100644 --- a/src/http.c +++ b/src/http.c @@ -41,6 +41,7 @@ so, delete this exception statement from your version. */ #include #include "wget.h" +#include "http.h" #include "utils.h" #include "url.h" #include "host.h" @@ -61,9 +62,6 @@ so, delete this exception statement from your version. */ extern char *version_string; -extern FILE *output_stream; -extern bool output_stream_regular; - #ifndef MIN # define MIN(x, y) ((x) > (y) ? (y) : (x)) #endif @@ -1089,8 +1087,6 @@ static char *create_authorization_line (const char *, const char *, static char *basic_authentication_encode (const char *, const char *); static bool known_authentication_scheme_p (const char *, const char *); -time_t http_atotm (const char *); - #define BEGINS_WITH(line, string_constant) \ (!strncasecmp (line, string_constant, sizeof (string_constant) - 1) \ && (ISSPACE (line[sizeof (string_constant) - 1]) \ @@ -2683,7 +2679,7 @@ extract_header_attr (const char *au, const char *attr_name, char **ret) buffer of 33 writable characters (32 for hex digits plus one for zero termination). */ static void -dump_hash (unsigned char *buf, const unsigned char *hash) +dump_hash (char *buf, const unsigned char *hash) { int i; @@ -2772,8 +2768,8 @@ digest_authentication_encode (const char *au, const char *user, { ALLOCA_MD5_CONTEXT (ctx); unsigned char hash[MD5_HASHLEN]; - unsigned char a1buf[MD5_HASHLEN * 2 + 1], a2buf[MD5_HASHLEN * 2 + 1]; - unsigned char response_digest[MD5_HASHLEN * 2 + 1]; + char a1buf[MD5_HASHLEN * 2 + 1], a2buf[MD5_HASHLEN * 2 + 1]; + char response_digest[MD5_HASHLEN * 2 + 1]; /* A1BUF = H(user ":" realm ":" password) */ gen_md5_init (ctx); @@ -2795,11 +2791,11 @@ digest_authentication_encode (const char *au, const char *user, /* RESPONSE_DIGEST = H(A1BUF ":" nonce ":" A2BUF) */ gen_md5_init (ctx); - gen_md5_update (a1buf, MD5_HASHLEN * 2, ctx); + gen_md5_update ((unsigned char *)a1buf, MD5_HASHLEN * 2, ctx); gen_md5_update ((unsigned char *)":", 1, ctx); gen_md5_update ((unsigned char *)nonce, strlen (nonce), ctx); gen_md5_update ((unsigned char *)":", 1, ctx); - gen_md5_update (a2buf, MD5_HASHLEN * 2, ctx); + gen_md5_update ((unsigned char *)a2buf, MD5_HASHLEN * 2, ctx); gen_md5_finish (ctx, hash); dump_hash (response_digest, hash);