- Only send port number in HTTP/1.1 Host: request if port != 80.
Fixes [bin/15415] from Takahiro Kambe <taca@sky.yamashina.kyoto.jp> - Fix bad mode passed by mls() to recvrequest(). Fixes [bin/16642] from <steve.mcclellan@radisys.com>
This commit is contained in:
parent
f23186dae7
commit
f801eb939e
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: cmds.c,v 1.95 2001/12/26 09:40:15 lukem Exp $ */
|
/* $NetBSD: cmds.c,v 1.96 2002/05/06 14:36:41 lukem Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996-2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996-2001 The NetBSD Foundation, Inc.
|
||||||
@ -107,7 +107,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94";
|
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: cmds.c,v 1.95 2001/12/26 09:40:15 lukem Exp $");
|
__RCSID("$NetBSD: cmds.c,v 1.96 2002/05/06 14:36:41 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -1346,7 +1346,7 @@ mls(int argc, char *argv[])
|
|||||||
sigfunc oldintr;
|
sigfunc oldintr;
|
||||||
int ointer, i;
|
int ointer, i;
|
||||||
int dolist;
|
int dolist;
|
||||||
char mode[1], *dest, *odest;
|
char *mode, *dest, *odest;
|
||||||
|
|
||||||
if (argc == 0)
|
if (argc == 0)
|
||||||
goto usage;
|
goto usage;
|
||||||
@ -1373,7 +1373,7 @@ mls(int argc, char *argv[])
|
|||||||
if (sigsetjmp(jabort, 1))
|
if (sigsetjmp(jabort, 1))
|
||||||
mabort();
|
mabort();
|
||||||
for (i = 1; mflag && i < argc-1 && connected; i++) {
|
for (i = 1; mflag && i < argc-1 && connected; i++) {
|
||||||
*mode = (i == 1) ? 'w' : 'a';
|
mode = (i == 1) ? "w" : "a";
|
||||||
recvrequest(dolist ? "LIST" : "NLST", dest, argv[i], mode,
|
recvrequest(dolist ? "LIST" : "NLST", dest, argv[i], mode,
|
||||||
0, 0);
|
0, 0);
|
||||||
if (!mflag && fromatty) {
|
if (!mflag && fromatty) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: fetch.c,v 1.133 2002/02/01 10:07:54 itojun Exp $ */
|
/* $NetBSD: fetch.c,v 1.134 2002/05/06 14:36:41 lukem Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1997-2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 1997-2001 The NetBSD Foundation, Inc.
|
||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
__RCSID("$NetBSD: fetch.c,v 1.133 2002/02/01 10:07:54 itojun Exp $");
|
__RCSID("$NetBSD: fetch.c,v 1.134 2002/05/06 14:36:41 lukem Exp $");
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -730,10 +730,13 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth)
|
|||||||
(p = strchr(h, '%')) != NULL) {
|
(p = strchr(h, '%')) != NULL) {
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
fprintf(fin, "Host: [%s]:%u\r\n", h, portnum);
|
fprintf(fin, "Host: [%s]", h);
|
||||||
free(h);
|
free(h);
|
||||||
} else
|
} else
|
||||||
fprintf(fin, "Host: %s:%u\r\n", host, portnum);
|
fprintf(fin, "Host: %s", host);
|
||||||
|
if (portnum != HTTP_PORT)
|
||||||
|
fprintf(fin, ":%u", portnum);
|
||||||
|
fprintf(fin, "\r\n");
|
||||||
fprintf(fin, "Accept: */*\r\n");
|
fprintf(fin, "Accept: */*\r\n");
|
||||||
fprintf(fin, "Connection: close\r\n");
|
fprintf(fin, "Connection: close\r\n");
|
||||||
if (restart_point) {
|
if (restart_point) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: version.h,v 1.27 2001/12/26 09:40:16 lukem Exp $ */
|
/* $NetBSD: version.h,v 1.28 2002/05/06 14:36:41 lukem Exp $ */
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -40,5 +40,5 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FTP_VERSION
|
#ifndef FTP_VERSION
|
||||||
#define FTP_VERSION "20011223"
|
#define FTP_VERSION "20020507"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user