ports/72144: patch to http_get adds forced host addressing
Jim Salter
send-pr at jrssystems.net
Tue Sep 28 13:20:21 UTC 2004
>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 at 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:
More information about the freebsd-ports-bugs
mailing list