Module Name:    src
Committed By:   christos
Date:           Mon Apr  4 23:59:41 UTC 2016

Modified Files:
        src/usr.bin/ftp: fetch.c

Log Message:
PR/51043: Yorick Hardy: ftp(1) should use the port number for CONNECT


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/usr.bin/ftp/fetch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.222 src/usr.bin/ftp/fetch.c:1.223
--- src/usr.bin/ftp/fetch.c:1.222	Fri Mar 18 14:42:25 2016
+++ src/usr.bin/ftp/fetch.c	Mon Apr  4 19:59:41 2016
@@ -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 u
 	} 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
 

Reply via email to