PATCH: [Bug 83064] SMB URI syntax error

Dawit A. adawit at kde.org
Thu Aug 12 14:05:55 BST 2004


On Thursday 12 August 2004 03:38, Stephan Kulow wrote:
> Am Donnerstag 12 August 2004 01:35 schrieb Dawit A.:
> > On Wednesday 11 August 2004 08:25, Stephan Kulow wrote:
> > > Am Mittwoch 11 August 2004 14:04 schrieb David Faure:
> > > > kurltest: smb: : checking 'MALFORMED' against expected value
> > > > 'VALID'... KO !
> > >
> > > Well, rfc 1738 leaves a lot for interpretation:
> > >
> > >    In general, URLs are written as follows:
> > >        <scheme>:<scheme-specific-part>
> >
> > RFC 2396 supercedes RFC 1738. Irrespective of that though the
> > <scheme-specific-part> has to have at least one character in it, e.g.
> > 'myproto:a' is acceptable. However, it cannot be blank.
>
> That again I can't read in the 2396 (no reference to "blank" or "at least"
> in the text). I just want to be sure we're rightfully rejecting smb: - so
> this is what I read in the RFC:
>
>    An absolute URI contains the name of the scheme being used (<scheme>)
>    followed by a colon (":") and then a string (the <scheme-specific-
>    part>) whose interpretation depends on the scheme.
>
> No mentioning that the string can't be empty.

There is no explicit mention of the <scheme-specific-part> not being empty, 
but if you read further in that same section or Appendix A (BNF 
representaion) you can see that by definition it cannot be empty. To 
summarize, the definition is basically as follows:

<scheme>:<scheme-specific-part>

<scheme-specific-part>=( hier_part | opaque_part )

hier_part =( net_path | abs_path ) [ "?" query ]
opaque_part = uric_no_slash *uric

net_path      = "//" authority [ abs_path ]
abs_path      = "/"  path_segments
uric_no_slash = unreserved | escaped | ";" | "?" | ":" | "@" |
                      "&" | "=" | "+" | "$" | ","

Hence at the minimum you need one of the following in order to be deemed a 
valid URL:

proto://
proto:/ OR
proto:<uric_no_slash>, e.g. proto:: is acceptable as an opaque URI :)

-- 
Regards,
Dawit A.
"Preach what you practice, practice what you preach"




More information about the kde-core-devel mailing list