Date: Tue, 28 Sep 2004 09:19:33 -0400 (EDT) From: Jim Salter <send-pr@jrssystems.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/72144: patch to http_get adds forced host addressing Message-ID: <200409281319.i8SDJXxt094351@ph34r.tehinterweb.net> Resent-Message-ID: <200409281320.i8SDKLWH040778@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409281319.i8SDJXxt094351>