* gpgkeys_http.c (get_key): Cosmetic fix - make sure that URLs with no
authorDavid Shaw <dshaw@jabberwocky.com>
Sat, 22 May 2004 03:35:57 +0000 (03:35 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Sat, 22 May 2004 03:35:57 +0000 (03:35 +0000)
path use a path of "/".

keyserver/ChangeLog
keyserver/gpgkeys_http.c

index 5ff4cc2..b3d2348 100644 (file)
@@ -1,5 +1,8 @@
 2004-05-21  David Shaw  <dshaw@jabberwocky.com>
 
+       * gpgkeys_http.c (get_key): Cosmetic fix - make sure that URLs
+       with no path use a path of "/".
+
        * gpgkeys_ldap.c (ldap2epochtime): We can always rely on timegm()
        being available now, since it's a replacement function.
 
index 8c750d1..e6190b8 100644 (file)
@@ -66,8 +66,8 @@ get_key(char *getkey)
   fprintf(output,"KEY 0x%s BEGIN\n",getkey);
 
   if(verbose)
-    fprintf(console,"gpgkeys: requesting key 0x%s from http://%s%s%s/%s\n",
-           getkey,host,port[0]?":":"",port[0]?port:"",path);
+    fprintf(console,"gpgkeys: requesting key 0x%s from http://%s%s%s%s%s\n",
+           getkey,host,port[0]?":":"",port[0]?port:"",path[0]?"":"/",path);
 
   request=malloc(strlen(scheme)+3+strlen(host)+1+strlen(port)+strlen(path)+99);
   if(!request)
@@ -76,8 +76,8 @@ get_key(char *getkey)
       return KEYSERVER_NO_MEMORY;
     }
 
-  sprintf(request,"%s://%s%s%s%s",scheme,host,
-         port[0]?":":"",port[0]?port:"",path);
+  sprintf(request,"%s://%s%s%s%s%s",scheme,host,
+         port[0]?":":"",port[0]?port:"",path[0]?"":"/",path);
 
   if(verbose>2)
     fprintf(console,"gpgkeys: HTTP URL is \"%s\"\n",request);