aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-08-10 00:56:45 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-08-10 00:56:45 +0200
commitdc2157a0878f3a140fac07b97687b3c3da42616b (patch)
treefe5702bfb29378088813f28da35f4b8a4e964490 /lib/ftp.c
parent5d5dd08e775732beec24a1041f8cb9b62e311188 (diff)
parse_remote_port: fix ;type= URL suffix over HTTP proxy
Test 563 is enabled now and verifies that the combo FTP type=A URL, CURLOPT_PORT set and proxy work fine. As a bonus I managed to remove the somewhat odd FTP check in parse_remote_port() and instead converted it to a better and more generic 'slash_removed' struct field. Checking the ->protocol field isn't right since when an FTP:// URL is sent over a HTTP proxy, the protocol is HTTP but the URL was handled by the FTP code and thus slash_removed is set TRUE for this case.
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index c3de7e0bc..40ed4b790 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -4178,6 +4178,7 @@ static CURLcode ftp_setup_connection(struct connectdata * conn)
}
data->state.path++; /* don't include the initial slash */
+ data->state.slash_removed = TRUE; /* we've skipped the slash */
/* FTP URLs support an extension like ";type=<typecode>" that
* we'll try to get now! */
@@ -4189,6 +4190,7 @@ static CURLcode ftp_setup_connection(struct connectdata * conn)
if(type) {
*type = 0; /* it was in the middle of the hostname */
command = Curl_raw_toupper(type[6]);
+ conn->bits.type_set = TRUE;
switch (command) {
case 'A': /* ASCII mode */