mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Skip `:port' in the host header if it is the DEFAULT_HTTPS_PORT when
using SSL. Patch submitted by Hack Kampbjorn <hack@hackdata.com>.
This commit is contained in:
parent
c12d5e7522
commit
5014d32c3a
@ -1,3 +1,13 @@
|
|||||||
|
2001-03-06 Hack Kampbjorn <hack@hackdata.com>
|
||||||
|
|
||||||
|
* http.c (gethttp): skip :port in host header if it is the
|
||||||
|
DEFAULT_HTTPS_PORT when using SSL.
|
||||||
|
|
||||||
|
* url.c: move the #define of DEFAULT_HTTP_PORT, DEFAULT_FTP_PORT
|
||||||
|
and DEFAULT_HTTPS_PORT to the header file so it can be use in the
|
||||||
|
rest of the code.
|
||||||
|
* url.h: Ditto
|
||||||
|
|
||||||
2001-03-01 Jonas Jensen <bones@huleboer.dk>
|
2001-03-01 Jonas Jensen <bones@huleboer.dk>
|
||||||
|
|
||||||
* retr.c (show_progress): Correctly calculate the number of bytes
|
* retr.c (show_progress): Correctly calculate the number of bytes
|
||||||
|
@ -780,7 +780,11 @@ gethttp (struct urlinfo *u, struct http_stat *hs, int *dt)
|
|||||||
|
|
||||||
/* String of the form :PORT. Used only for non-standard ports. */
|
/* String of the form :PORT. Used only for non-standard ports. */
|
||||||
port_maybe = NULL;
|
port_maybe = NULL;
|
||||||
if (remport != 80)
|
#ifdef HAVE_SSL
|
||||||
|
if (remport != (u->proto == URLHTTPS ? DEFAULT_HTTPS_PORT : DEFAULT_HTTP_PORT) )
|
||||||
|
#else
|
||||||
|
if (remport != DEFAULT_HTTP_PORT)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
port_maybe = (char *)alloca (numdigit (remport) + 2);
|
port_maybe = (char *)alloca (numdigit (remport) + 2);
|
||||||
sprintf (port_maybe, ":%d", remport);
|
sprintf (port_maybe, ":%d", remport);
|
||||||
|
@ -43,11 +43,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
extern int errno;
|
extern int errno;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Default port definitions */
|
|
||||||
#define DEFAULT_HTTP_PORT 80
|
|
||||||
#define DEFAULT_FTP_PORT 21
|
|
||||||
#define DEFAULT_HTTPS_PORT 443
|
|
||||||
|
|
||||||
/* Table of Unsafe chars. This is intialized in
|
/* Table of Unsafe chars. This is intialized in
|
||||||
init_unsafe_char_table. */
|
init_unsafe_char_table. */
|
||||||
|
|
||||||
|
@ -20,6 +20,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#ifndef URL_H
|
#ifndef URL_H
|
||||||
#define URL_H
|
#define URL_H
|
||||||
|
|
||||||
|
/* Default port definitions */
|
||||||
|
#define DEFAULT_HTTP_PORT 80
|
||||||
|
#define DEFAULT_FTP_PORT 21
|
||||||
|
#define DEFAULT_HTTPS_PORT 443
|
||||||
|
|
||||||
|
|
||||||
/* If the string contains unsafe characters, duplicate it with
|
/* If the string contains unsafe characters, duplicate it with
|
||||||
encode_string, otherwise just copy it with strdup. */
|
encode_string, otherwise just copy it with strdup. */
|
||||||
#define CLEANDUP(x) (contains_unsafe (x) ? encode_string (x) : xstrdup (x))
|
#define CLEANDUP(x) (contains_unsafe (x) ? encode_string (x) : xstrdup (x))
|
||||||
|
Loading…
Reference in New Issue
Block a user