X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=7b3f379dec0d323162a296c26741488c1081ebda;hp=69760e7a1c3233e55cc6181160d2cc5b662b4766;hb=277e840a0f8e3ec8800cfe7407fe3c16000bc622;hpb=9000d2b527680b4b13964475d84df42815d40e37 diff --git a/src/http.c b/src/http.c index 69760e7a..7b3f379d 100644 --- a/src/http.c +++ b/src/http.c @@ -31,30 +31,13 @@ so, delete this exception statement from your version. */ #include #include -#include -#ifdef HAVE_STRING_H -# include -#else -# include -#endif +#include #ifdef HAVE_UNISTD_H # include #endif #include #include -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif -#ifndef errno -extern int errno; -#endif +#include #include "wget.h" #include "utils.h" @@ -368,7 +351,7 @@ request_send (const struct request *req, int fd) /* Send the request to the server. */ - write_error = fd_write (fd, request_string, size - 1, -1.0); + write_error = fd_write (fd, request_string, size - 1, -1); if (write_error < 0) logprintf (LOG_VERBOSE, _("Failed writing HTTP request: %s.\n"), strerror (errno)); @@ -412,7 +395,7 @@ post_file (int sock, const char *file_name, wgint promised_size) if (length == 0) break; towrite = MIN (promised_size - written, length); - write_error = fd_write (sock, chunk, towrite, -1.0); + write_error = fd_write (sock, chunk, towrite, -1); if (write_error < 0) { fclose (fp); @@ -840,7 +823,7 @@ skip_short_body (int fd, wgint contlen) while (contlen > 0) { - int ret = fd_read (fd, dlbuf, MIN (contlen, SKIP_SIZE), -1.0); + int ret = fd_read (fd, dlbuf, MIN (contlen, SKIP_SIZE), -1); if (ret <= 0) { /* Don't normally report the error since this is an @@ -1100,13 +1083,13 @@ free_hstat (struct http_stat *hs) hs->error = NULL; } -static char *create_authorization_line PARAMS ((const char *, const char *, - const char *, const char *, - const char *, int *)); -static char *basic_authentication_encode PARAMS ((const char *, const char *)); -static int known_authentication_scheme_p PARAMS ((const char *, const char *)); +static char *create_authorization_line (const char *, const char *, + const char *, const char *, + const char *, int *); +static char *basic_authentication_encode (const char *, const char *); +static int known_authentication_scheme_p (const char *, const char *); -time_t http_atotm PARAMS ((const char *)); +time_t http_atotm (const char *); #define BEGINS_WITH(line, string_constant) \ (!strncasecmp (line, string_constant, sizeof (string_constant) - 1) \ @@ -1544,7 +1527,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) if (opt.post_data) { DEBUGP (("[POST data: %s]\n", opt.post_data)); - write_error = fd_write (sock, opt.post_data, post_data_size, -1.0); + write_error = fd_write (sock, opt.post_data, post_data_size, -1); } else if (opt.post_file_name && post_data_size != 0) write_error = post_file (sock, opt.post_file_name, post_data_size);