# HG changeset patch # User masneyb # Date 1074457808 0 # Node ID c63208a1f0f1e9d9c27ceb45eab7b9e692162179 # Parent af541d789f4cebe04bf20eb79e4e8f906a89ad4b 2003-1-18 Brian Masney * lib/misc.c (gftp_build_path) - when checking for already existing /'s, not only look at the end of the currently built string, but look at the beginning of the token that is about to be added (from Aurelien Jarno ) * lib/rfc2068.c (rfc2068_list_files) - if the current directory is /, just send the hostname over to the HTTP server. This was broken on some HTTP servers. (from Aurelien Jarno ) diff -r af541d789f4c -r c63208a1f0f1 ChangeLog --- a/ChangeLog Sun Jan 18 20:18:19 2004 +0000 +++ b/ChangeLog Sun Jan 18 20:30:08 2004 +0000 @@ -1,4 +1,14 @@ 2003-1-18 Brian Masney + * lib/misc.c (gftp_build_path) - when checking for already existing + /'s, not only look at the end of the currently built string, but look + at the beginning of the token that is about to be added + (from Aurelien Jarno ) + + * lib/rfc2068.c (rfc2068_list_files) - if the current directory is /, + just send the hostname over to the HTTP server. This was broken on some + HTTP servers. + (from Aurelien Jarno ) + * lib/gftp.h lib/misc.c src/gtk/delete_dialog.c src/gtk/transfer.c src/gtk/view_dialog.c src/uicommon/gftpui.c - renamed all instances of copy_request() to gftp_copy_request(). Removed second argument @@ -2009,7 +2019,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.202 2004/01/18 20:18:17 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.203 2004/01/18 20:30:08 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r af541d789f4c -r c63208a1f0f1 lib/misc.c --- a/lib/misc.c Sun Jan 18 20:18:19 2004 +0000 +++ b/lib/misc.c Sun Jan 18 20:30:08 2004 +0000 @@ -1194,7 +1194,7 @@ { len = strlen (element); - if (retlen > 0 && ret[retlen - 1] == '/') + if (retlen > 0 && (ret[retlen - 1] == '/' || element[0] == '/')) add_separator = 0; else { diff -r af541d789f4c -r c63208a1f0f1 lib/rfc2068.c --- a/lib/rfc2068.c Sun Jan 18 20:18:19 2004 +0000 +++ b/lib/rfc2068.c Sun Jan 18 20:30:08 2004 +0000 @@ -414,7 +414,10 @@ params = request->protocol_data; gftp_lookup_request_option (request, "use_http11", &use_http11); - hd = gftp_build_path (request->hostname, request->directory, NULL); + if (strncmp (request->directory, "/", strlen (request->directory)) == 0) + hd = g_strdup (request->hostname); + else + hd = gftp_build_path (request->hostname, request->directory, NULL); if (request->username == NULL || *request->username == '\0') tempstr = g_strconcat ("GET ", request->url_prefix, "://", hd,