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

List:       kde-devel
Subject:    Re: smb [was: Re: KWin Development]
From:       Nicolas Brodu <nicolas.brodu () free ! fr>
Date:       2000-03-30 13:05:50
[Download RAW message or body]

Dawit A wrote:
> > About SMB:
> > - Fixed string corruption bug.
> > - Patched library to accept smb: followed by 0, 1, 2, 3 (or more) /
> 
> Nicolas, a scheme followed by a scheme-separator and then no other character is
> is an invalid URL [ look @ RFC 2396 ].  Thus, you should not support "smb:" at

I know that.

> all!!!  If you want to support it you will have to use KURIFilter to filter it
> to the appropriate syntax [ look at @kio/KURIFilter and kdebase/kcontrol/ebrowsing/shorturi/].
> I will be commiting a re-write of this plugin class by the weekend and have a
> short tutorial on how to use it.

This isn't that at all. It's just that internally the libsmb++ uses URLs for
handling file locations. It should never receive 'smb:' from KURL as it isn't
valid. What I mean is that if the lib receive one day smb:, it will still work
(before, it asked a password for IPC$, which was clearly wrong). Once the
parsing is done, the URL is rebuilt properly for internal management.
As you see, this has nothing to do with KURIFilter. I just made sure the lib can
handle internally whatever garbage is sent to it.

> 
> Is this why you added that static method to KURL ??  IMHO, that is wrong! I
> personally think KURL is getting too big for its own good.  It is supposed to
> only parse and at most validate URLs.  The filtering should be done by the
> filter classes.  If you want I will add the filtering rule to shortURI filter
> for converting "smb:" to the proper format...

The static function was a hack. It was not intended to convert smb: to smb:// or
whatever, but just enable smb:// to be recognised as valid. Adding an entry in
the .desktop file to say this protocol accepts empty host/path would get rid of
this static.

I don't know about filtering, except that I didn't implement any of that in
KURL. The only filter rule I set up was converting Samba notation \\host\path
to smb://host/path when it's entered in konqueror location box, in
konq_mainview.cc.

Cheers,
Nicolas
-- 
A shortcut is the longest distance between two points. (unknown author)

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

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