From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 28 13:20:21 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9058516A4CE for ; Tue, 28 Sep 2004 13:20:21 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 753AE43D45 for ; Tue, 28 Sep 2004 13:20:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i8SDKL7r040779 for ; Tue, 28 Sep 2004 13:20:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8SDKLWH040778; Tue, 28 Sep 2004 13:20:21 GMT (envelope-from gnats) Resent-Date: Tue, 28 Sep 2004 13:20:21 GMT Resent-Message-Id: <200409281320.i8SDKLWH040778@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jim Salter Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5085116A4CE for ; Tue, 28 Sep 2004 13:19:41 +0000 (GMT) Received: from ph34r.tehinterweb.net (cae168-196-176.sc.rr.com [24.168.196.176]) by mx1.FreeBSD.org (Postfix) with SMTP id BB27F43D45 for ; Tue, 28 Sep 2004 13:19:40 +0000 (GMT) (envelope-from jimbo@ph34r.tehinterweb.net) Received: (qmail 94353 invoked from network); 28 Sep 2004 13:19:40 -0000 Received: from unknown (HELO ph34r.tehinterweb.net) (127.0.0.1) by localhost.tehinterweb.net with SMTP; 28 Sep 2004 13:19:40 -0000 Received: (from root@localhost) by ph34r.tehinterweb.net (8.12.10/8.12.10/Submit) id i8SDJXxt094351; Tue, 28 Sep 2004 09:19:33 -0400 (EDT) (envelope-from jimbo) Message-Id: <200409281319.i8SDJXxt094351@ph34r.tehinterweb.net> Date: Tue, 28 Sep 2004 09:19:33 -0400 (EDT) From: Jim Salter To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/72144: patch to http_get adds forced host addressing X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jim Salter List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2004 13:20:21 -0000 >Number: 72144 >Category: ports >Synopsis: patch to http_get adds forced host addressing >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Sep 28 13:20:21 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Jimbo >Release: FreeBSD 5.2.1-RELEASE amd64 >Organization: >Environment: System: FreeBSD ph34r.tehinterweb.net 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #1: Sun Aug 22 15:52:16 EDT 2004 jimbo@ph34r.tehinterweb.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: the port http_get did not have provisions for testing specific servers in a multi-homed webfarm using virtual domains. The enclosed path adds such an option, in which you can use the argument [-h some.particular.ip.address] to force the HTTP request to be made of a particular machine regardless of what your DNS resolves the URL you are requesting to. >How-To-Repeat: use http_get >Fix: apply this patch to http_get.c 5,7c5 < ** ifdefs to handle https via OpenSSL. -h argument for debugging multihomed < ** URLs added by Jim Salter. < ** --- > ** ifdefs to handle https via OpenSSL. 40d37 < static char* force_host; 78,79d74 < force_host = (char*) "[NONE]"; < 89,93d83 < else if ( strcmp( argv[argn], "-h" ) == 0 && argn + 1 < argc ) < { < ++argn; < force_host = argv[argn]; < } 140c130 < (void) fprintf( stderr, "usage: %s [-t timeout] [-h force host address] [-r referer] [-u user-agent] [-a username:password] url\n", argv0 ); --- > (void) fprintf( stderr, "usage: %s [-t timeout] [-r referer] [-u user-agent] [-a username:password] url\n", argv0 ); 231,240c221 < < if ( force_host == "[NONE]" ) < { < sockfd = open_client_socket( host, port ); < } < else < { < sockfd = open_client_socket( force_host, port ); < } < --- > sockfd = open_client_socket( host, port ); >Release-Note: >Audit-Trail: >Unformatted: