Fix issue 1446: honor ports given in SRV responses.
authorDavid Shaw <dshaw@jabberwocky.com>
Wed, 19 Dec 2012 02:58:53 +0000 (21:58 -0500)
committerDavid Shaw <dshaw@jabberwocky.com>
Wed, 19 Dec 2012 02:58:53 +0000 (21:58 -0500)
commitf2f12f41efe5a476833295dc6c44fcd887d0abe6
treebd084f8cc8e284ff215e3282e36df04bc8d23d3c
parent3a51d501b915dd930445bcf8330acfdabb2e2934
Fix issue 1446: honor ports given in SRV responses.

* common/http.c (send_request, connect_server, http_open): Use a
  struct srv instead of a single srvtag so we can pass the chosen host
  and port back to the caller.
  (connect_server): Use the proper port in the HAVE_GETADDRINFO case.

* keyserver/curl-shim.c (curl_easy_perform): Use struct srv and log
  chosen host and port.

* keyserver/gpgkeys_hkp.c (main): Properly take the port given by SRV.

Backported from ba9e974f1fd85b3dbbfb5e26d7a14f71d07c7cf2
include/http.h
keyserver/curl-shim.c
keyserver/gpgkeys_hkp.c
util/http.c