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

List:       kde-bugs-dist
Subject:    [Bug 62425] Lowercasing/normalising URLs breaks some non-compliant
From:       "Petter E.Stokke" <gibreel () gibreel ! net>
Date:       2003-08-13 14:15:08
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
     
http://bugs.kde.org/show_bug.cgi?id=62425     




------- Additional Comments From gibreel@gibreel.net  2003-08-13 16:15 -------
> 1) I don't like the URIMODE_ prefix (all capitals with an underscore) in the
> enum. In my view, it's ugly, but that's me. We'll see if the later if the coding
> style guide says anything about that.

I originally didn't use a prefix there, but I got worried about namespace
collisions. The prefix style was inspired by the enums in KIO, but I'll be the
first to agree with you about their ugliness. Possibly we should just do away
with the prefix altogether? As long as they're capitalised, at least they won't
collide with any method names.

> 2) I think you should be bold and move all the processing into different parse
> functions, and make KURL::parse simply select the parser function from the
> uriMode. That way, we'd have KURL::parseNormalURI being a copy of the current
> KURL::parse, then we'd also have KURL::parseRawURI (essentially a no-op) and a
> future KURL::parseMailtoURI. That would make the code cleaner. 

Good idea - the way raw URIs are parsed right now is identical to the standard
parser, and with ed2k URLs what actually happens is that the whole URL aside
from the protocol ends up in the host field. This is syntactically correct if
you assume ed2k is standards compliant, but extremely counter-intuitive - it
would probably be a lot better to just put the whole URI (not including the
protocol) into the path field instead of trying to parse it as a standard URL
without the IDNA code applied on the host name like it's done right now.


Another thing that bothers me: I've tried to maintain binary compatibility as
much as possible, but I think I broke it after all, judging by Konqueror's
misbehaving before I did a complete kdebase recompile. The three extra
constructors I added are a result of this, but I find them less than pleasing -
I'd rather put the URIMode argument into the original three as a default
argument. Is that a big issue?
[prev in list] [next in list] [prev in thread] [next in thread] 

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