[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Patch to add direct FTP proxy support in kio_ftp
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2001-06-29 22:00:49
[Download RAW message or body]

Hi Michael,
On Friday 29 June 2001 12:05, Michael Goffioul wrote:
> Dawit Alemayehu wrote:

> >
> > Can update kdelibs/kio and try the following patch please.
> > The patch assumes that the proxy FTP server does not require
> > you to login, but the remote server can as needed.
>
> OK, I tried and it works, but I needed to adjust a little bit
> how the "user" command is constructed to make it work:
>
> instead of
>
> if ( m_bUseProxy )
>   tempbuf += '@' + m_host.latin1();
>
> I had to use
>
> if ( m_bUseProxy )
> {
>   tempbuf += "@";
>   tempbuf += m_host.latin1();
> }

Hmm... that's weird.  Changed but kept "@" as '@' because this would
avoid the creation of another string in memory to do the copying...

> Otherwise, tempbuf only contains "user <login>" instead of the
> wanted "user <login>@<host>". Note also that you could add in
> this if statement the following:
>
>   if ( m_port > 0 && m_port != 21 )
>   {
>     tempbuf += ":";
>     tempbuf += QString::number( m_port ).latin1();
>   }

Okay.  Added that as well :)

> But as I said, I coudn't test it because of a missing FTP server
> running on an "exotic" port. 

> I also had to keep a kio_ftprc file with the single line 
> "DisablePassiveMode=false", this setting should be kept in mind when
> redesigning the proxy config dialog.

Well that actually does not belong in the proxy config dialog, but rather
in the Network/Preferences dialog since some people that do not use proxy
servers also have problem with passive mode settings.  Hence it will have to
go to that dialog along with the "EnableAutoLogin" entry...

> A final note concerning FTP proxy, but I think there's no solution
> for it: when the FTP proxy is unable to connect to the remote
> host (for any reason), it answers with the tag "530", like a wrong
> user/login pair. In konqueror you then get the password dialog
> instead of something saying "Cannot connect to host". This is
> rather confusing, but once you'r used to it, it's OK.

This is a very very known problem :)  The FTP protocol is notorious for not
returning unique status code for requested actions so it is virtually impossible
for a GUI client to distinguish what it is supposed to do.  The only work around
is to simply show the user the error message sent back from the server and ask 
the user what (s)he wants to do.  I am going to fix that soon, but am not sure
if it can be added for 2.2 since it requires new messages :(

> Thanks for your help, I guess you'll commit changes to ftp.cc soon.

You're quite welcome and yes I will commit it along with the changes you 
outlined.

Regards,
Dawit A.
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic