[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.19-47-gcbe98b2

by David Shaw cvs at cvs.gnupg.org
Sat Dec 15 16:37:52 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, STABLE-BRANCH-2-0 has been updated
       via  cbe98b2cb1e40ba253300e604996681ae191e363 (commit)
      from  ba9e974f1fd85b3dbbfb5e26d7a14f71d07c7cf2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cbe98b2cb1e40ba253300e604996681ae191e363
Author: David Shaw <dshaw at jabberwocky.com>
Date:   Sat Dec 15 10:35:19 2012 -0500

    Part of issue 1447: Pass proper Host header when SRV is used.
    
    * common/http.c (send_request, connect_server): Set proper Host header
      (no :port, host is that of the SRV) when SRV is used in the
      curl-shim.

diff --git a/common/http.c b/common/http.c
index ea8b8d5..5b67acc 100644
--- a/common/http.c
+++ b/common/http.c
@@ -1009,7 +1009,7 @@ send_request (http_t hd, const char *auth,
     {
       char portstr[35];
         
-      if (port == 80)
+      if (port == 80 || (srv && srv->used_server))
         *portstr = 0;
       else
         sprintf (portstr, ":%u", port);
@@ -1544,7 +1544,7 @@ connect_server (const char *server, unsigned short port,
                 unsigned int flags, struct http_srv *srv)
 {
   int sock = -1;
-  int srvcount = 0;
+  int srvcount = 0, fakesrv = 0;
   int hostfound = 0;
   int srvindex, connected, chosen=-1;
   int last_errno = 0;
@@ -1613,6 +1613,7 @@ connect_server (const char *server, unsigned short port,
       strncpy (serverlist->target, server, MAXDNAME);
       serverlist->target[MAXDNAME-1] = '\0';
       srvcount = 1;
+      fakesrv = 1;
     }
 
 #ifdef HAVE_GETADDRINFO
@@ -1713,7 +1714,7 @@ connect_server (const char *server, unsigned short port,
     }
 #endif /* !HAVE_GETADDRINFO */
 
-  if(chosen>-1 && srv)
+  if(!fakesrv && chosen>-1 && srv)
     {
       srv->used_server = xstrdup (serverlist[chosen].target);
       srv->used_port = serverlist[chosen].port;

-----------------------------------------------------------------------

Summary of changes:
 common/http.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list