2006/9/21, Oleg Khaschansky <[EMAIL PROTECTED]>:

I'd like to quote RFC 2396 here:

"The URI syntax does not require that the scheme-specific-part have
   any general structure or set of semantics which is common among all
   URI.  However, a subset of URI do share a common syntax for
   representing hierarchical relationships within the namespace.  This
   "generic URI" syntax consists of a sequence of four main components:

      <scheme>://<authority><path>?<query>

   each of which, except <scheme>, may be absent from a particular URI."

...

"We use the term <path> to refer to both the <abs_path> and
   <opaque_part> constructs, since they are mutually exclusive for any
   given URI and can be parsed as a single component."

So "file://C:/1.txt" appears to be a valid URI of the following kind:
<scheme>://<path>, where <path> is an <opaque_part>.


I still think this is a bug of RI. According to RFC2396, to be recognized as
server-based authority, the uri should obey a more formal rule(than
registry-based authority). Apparently,
file://C:/1.txt can only be recognized as a registry-based authority.

[cite]
Otherwise this method attempts once more to parse the authority component
into user-information, host, and port components, and throws an exception
describing why the authority component could not be parsed in that way.

This method is provided because the generic URI syntax specified in RFC
2396  cannot always distinguish a malformed server-based authority from a
legitimate registry-based authority.
[cite]

IMHO, this paragraph of depiction aims to say that this method is used to
strictly distinguish server-based authority from a legitimate registry-based
authority.
And will throw exception if the URI is not a server-based authority.

But RI apparently do not behave as spec depicts, so I suggest to change the
component to non-bug difference.

Best regards



This means that #1126 is, actually, a bug. Am I correct?


On 9/21/06, Spark Shen <[EMAIL PROTECTED]> wrote:
> [snip]
> >
> >
> > >>Vladimir Ivanov
> > <http://issues.apache.org/jira/secure/ViewProfile.jspa?name=vladimir>
> > >>unit test.
> > >>Seems, that patch will be system dependent (special handling for Win
> > should be added)
> [snip]
> And I agree with Vladimir Ivanov here, on Win-platform, special handling
> for file system is needed.
>
> Best regards
>
> --
> Spark Shen
> China Software Development Lab, IBM
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Spark Shen
China Software Development Lab, IBM

Reply via email to