PR/51043: Yorick Hardy: ftp(1) should use the port number for CONNECT
This commit is contained in:
parent
adc5c06021
commit
b1bf748a07
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fetch.c,v 1.222 2016/03/18 18:42:25 christos Exp $ */
|
||||
/* $NetBSD: fetch.c,v 1.223 2016/04/04 23:59:41 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: fetch.c,v 1.222 2016/03/18 18:42:25 christos Exp $");
|
||||
__RCSID("$NetBSD: fetch.c,v 1.223 2016/04/04 23:59:41 christos Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
|
@ -847,8 +847,8 @@ print_connect(FETCH *fin, const struct urlinfo *ui)
|
|||
} else
|
||||
h = ui->host;
|
||||
|
||||
fetch_printf(fin, "CONNECT %s:%s HTTP/1.1\r\n", h, ui->port);
|
||||
fetch_printf(fin, "Host: %s:%s\r\n", h, ui->port);
|
||||
fetch_printf(fin, "CONNECT %s:%d HTTP/1.1\r\n", h, ui->portnum);
|
||||
fetch_printf(fin, "Host: %s:%d\r\n", h, ui->portnum);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue