FTP over www proxy

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

FTP over www proxy

Postby jvrsvw » Jun 01 11 3:01 am

Hi

We are using FTP over www proxy and it works fine, until you want to download a file with a "special character" in the file name ie. gcc-c++-4.1.2-50.el5.i386.rpm

If you try direct it works 100% percent.

The error given by Wingate is the following :

Access Denied
The FTP server returned an error to the RETR command: /mirror/centos/5.6/os/i386/CentOS/gcc-c -4.1.2-50.el5.i386.rpm: No such file or directory

Wingate gets rid of the actual hostname in the URL and drops the "++" in the file name.

Here is the complete path - ftp://ftp.is.co.za/mirror/centos/5.6/os ... 5.i386.rpm

Thanks
jvrsvw
 
Posts: 22
Joined: Jul 25 09 3:48 am

Re: FTP over www proxy

Postby adrien » Jun 01 11 10:47 am

Hi

thanks for that - that sounds like a bug in our FTP listing to HTML conversion code.

Is this WinGate 6.6.4?

Regards

Adrien de Croy
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: FTP over www proxy

Postby jvrsvw » Jun 01 11 9:15 pm

Hi Adrien

I have tested with version 6.6.3 and 6.6.4 and on both the result is the same.

Thanks
jvrsvw
 
Posts: 22
Joined: Jul 25 09 3:48 am

Re: FTP over www proxy

Postby jvrsvw » Jun 08 11 10:39 pm

Any Wingate staff ?

I also sent two issues to support@wingate.com and not getting any reply.

Please assist soonest
jvrsvw
 
Posts: 22
Joined: Jul 25 09 3:48 am

Re: FTP over www proxy

Postby adrien » Jun 09 11 12:34 am

Hi

we'll need to fix the bug. I think it probably affects 7 as well. This isn't going to be a quick fix sorry.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: FTP over www proxy

Postby jvrsvw » Jun 09 11 9:54 pm

Thanks Adrien

Any reason why I am not getting feedback from support for my calls that I logged ?
jvrsvw
 
Posts: 22
Joined: Jul 25 09 3:48 am

Re: FTP over www proxy

Postby adrien » Jun 09 11 11:26 pm

Hi

I just sent you one. Support was waiting for me to reply.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: FTP over www proxy

Postby adrien » Jun 10 11 12:36 am

OK, I think I figured out what is going on.

you aren't browsing the folder contents and then clicking on the link - you're entering the URL directly correct?

In which case, it's the URL that is the problem.

in a URL, a + sign is an escaped space.

Spaces are not allowed in HTTP URLs in proxy requests, since the tokens in the HTTP request-line (which contains the URL) are space-delimited. So spaces (and other reserved characters in URLs) are "escaped" - converted to prevent them from breaking parsing. A space is typically converted either to a + sign, or %20

When a web browser is set to use a proxy for FTP, it's actually an HTTP proxy, and it makes an HTTP request to the proxy, which has to implement an FTP client, which makes the request, and converts the response back to http to send back to the client.

So fundamentally the request is HTTP to the proxy, which has to treat the URL accordingly. Since it's connecting to an FTP server to retrieve the file, it needs to un-escape the resource part of the URL (the bit after the server:port). This is because we're then talking FTP which doesn't have those restrictions, and wouldn't recognise the escaped version of a filename or path.

So, WinGate unescapes those pluses to spaces when requesting to the FTP server, and that's why the server complained.

So, you need to change those + to a % encoding, which is %2b. The minuses are normally encoded as well it seems.

When I do a folder listing, the URL I get for that download is

ftp://ftp.is.co.za/mirror/centos/5.6/os ... 5.i386.rpm

Now, if you were connecting directly, there's no conversion, since no HTTP request is made to an HTTP proxy (which is what happens for FTP urls when you're using a proxy in a web client). So when connecting directly, you'd use the URL you gave me. I need to do some more research to see whether there's a way around this, since in the case of the plus sign, it's possible the behaviour should change for FTP URLs, I'll need to test with all the browsers.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: FTP over www proxy

Postby adrien » Jun 10 11 1:04 am

OK, looks like there are different escaping rules for URLs when it's FTP over HTTP.

So we can fix this so you don't need to use a different URL depending on whether you're going through a proxy or not.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: FTP over www proxy

Postby james.cooper » Apr 04 12 2:51 am

Hi Adrien,

Did you manage to get a resolution to this problem? I am struggling with the same issue as well and wondered what we have to do to get this fixed. We do have version protection so we can upgrade to V7 if needed but would like to know if there is a way without having to do this :)

I cannot link the web path here as the content is company sensitive but if you can do remote session UK time I would be more than happy for you to hop on with me at some point so that you can see what is happening :)

Cheers,
James
james.cooper
 
Posts: 1
Joined: Apr 04 12 2:46 am

Re: FTP over www proxy

Postby adrien » Apr 04 12 12:08 pm

Hi

yes I fixed it June 10 2011. So it was in WinGate 7 from then onwards. So the update would potentially be the quickest fix for you for this issue.

Make sure you read http://help.qbik.com/index.php?topic_id=14

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland


Return to WinGate

Who is online

Users browsing this forum: No registered users and 1 guest