diff -r 7621c792291e -r 60013249db86 http.c
--- a/http.c	Fri Mar 25 13:57:52 2011 +0300
+++ b/http.c	Fri Mar 25 15:26:38 2011 +0300
@@ -2065,6 +2065,9 @@
 	*port = evcon->port;
 }
 
+static struct evutil_addrinfo *
+make_addrinfo(const char *address, ev_uint16_t port);
+
 int
 evhttp_connection_connect(struct evhttp_connection *evcon)
 {
@@ -2076,8 +2079,14 @@
 	EVUTIL_ASSERT(!(evcon->flags & EVHTTP_CON_INCOMING));
 	evcon->flags |= EVHTTP_CON_OUTGOING;
 
-	evcon->fd = bind_socket(
-		evcon->bind_address, evcon->bind_port, 0 /*reuse*/);
+	if (evcon->address && !evcon->bind_address) {
+		struct evutil_addrinfo * ai = make_addrinfo(evcon->address, evcon->port);
+		evcon->fd = socket(ai ? ai->ai_family : AF_INET, SOCK_STREAM, 0);
+		evutil_freeaddrinfo(ai);
+	} else {
+		evcon->fd = bind_socket(
+			evcon->bind_address, evcon->bind_port, 0 /*reuse*/);
+	}
 	if (evcon->fd == -1) {
 		event_debug(("%s: failed to bind to \"%s\"",
