aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/ChangeLog5
-rw-r--r--util/http.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index fd6ce4146..6230902b1 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-11 Werner Koch <[email protected]>
+
+ * http.c (do_parse_uri): Changed initialization of the port number
+ so that it does also work with x-hkp. By David Shaw.
+
2001-09-19 Werner Koch <[email protected]>
* w32reg.c (get_root_key): New.
diff --git a/util/http.c b/util/http.c
index f77472e9d..02b558f5f 100644
--- a/util/http.c
+++ b/util/http.c
@@ -284,10 +284,11 @@ do_parse_uri( PARSED_URI uri, int only_local_part )
*p2++ = 0;
strlwr( p );
uri->scheme = p;
+ uri->port = 80;
if( !strcmp( uri->scheme, "http" ) )
;
else if( !strcmp( uri->scheme, "x-hkp" ) ) /* same as HTTP */
- ;
+ uri->port = 11371;
else
return G10ERR_INVALID_URI; /* Unsupported scheme */
@@ -308,8 +309,7 @@ do_parse_uri( PARSED_URI uri, int only_local_part )
*p3++ = 0;
uri->port = atoi( p3 );
}
- else
- uri->port = 80;
+
uri->host = p;
if( (n = remove_escapes( uri->host )) < 0 )
return G10ERR_BAD_URI;