Review Request: Fix for connecting to FTP sites through HTTP proxy

Dawit A adawit at kde.org
Wed Mar 9 22:43:23 GMT 2011


On Wed, Mar 9, 2011 at 2:53 PM, Andreas Hartmetz <ahartmetz at gmail.com> wrote:
> On Wednesday 09 March 2011 20:06:40 Dawit A wrote:
>> On Wed, Mar 9, 2011 at 12:46 PM, David Faure <faure at kde.org> wrote:
>> > On Wednesday 09 March 2011, Dawit Alemayehu wrote:
>> >> proxiedBy always returns true since ftp.protocol no longer contains a
>> >> "ProxiedBy=" entry.
>> >
>> > Yes it does, of course. But the point of the additional if() is to not go
>> > into that code block for other procotols, like HTTP, FISH, and so on.
>>
>> I meant to say "always returns false". KProtocolInfo::proxiedBy(...)
>> always returns an empty string for FTP. I just looked at the log for
>> ftp.protocol file and it seems that Andreas had mistakenly removed the
>> "proxiedBy=" statement from the ftp.protocol file. See
>>
>> http://quickgit.kde.org/?p=kdelibs.git&a=commit&h=7b61621c023db80af888a12be
>> 7fcb9fd6c9a6fb8
>>
>> As such the changes the fix I committed current does not fix the
>> problem. FTP over HTTP proxy still does not work. Anyhow, if the
>> incorrect commit mentioned above gets reverted, the problem away. Any
>> objections with me doing that ?
>>
> I was thinking proxiedBy= was there to somehow involve the HTTP ioslave in
> proxied FTP transactions because the HTTP (and SOCKS IIRC) proxy
> implementation was there.

Yes, it is, but not for those reasons. That entry was not put there
simply because we had an HTTP proxy implementation, but because FTP
requests can be routed through an HTTP proxy server just like HTTP and
HTTPS requests. IOW, what do you do when the user specifies a HTTP
proxy server as the FTP proxy. It is legal and valid to do that. What
is happening in KDE now is that functionality is not supported for
some unknown reason.

> What I gather from this thread is that some HTTP proxies present FTP in HTML
> format... I think you have to be careful not to break FTP over SOCKS proxy if
> you make any changes here.

Since there is no input for specifying SOCKS proxy in the proxy
configuration dialog, then I assume that the user is supposed to enter
a non standard url, "socks://<host>:[<port>]", for specifying SOCKS
proxy, correct ? If so, then ensuring FTP over SOCKS is not treated as
FTP over HTTP is a simple one line fix in
KProtocolManager::slaveProtocol.

BTW, as it stands right now the ftp protocol does not support FTP over SOCKS.

> proxiedBy should probably be per proxy protocol now.

Sorry, but that would only serve to complicate proxy handling much
more than the big mess it already is.

Regards,
Dawit A.




More information about the kde-core-devel mailing list