Hidden chat excerpt added, where should raw ?knowledge? like this be kept?
[Imported from Trac: page NewCapDesign, version 24]
parent
d54695bd53
commit
02afc8834f
|
@ -27,6 +27,75 @@ established sense). To make them real, we need to:
|
|||
* understand how URI/URL/URNs are built, decide about hierarchical segments
|
||||
vs non-hierarchical segments. What's magical about a leading double-slash?
|
||||
Do we need one?
|
||||
<!---
|
||||
Edited chat excerpt from #tahoe-lafs on irc.freenode.org regarding above point:
|
||||
|
||||
[7:52pm] <Zarutian> zooko: havent heard of new-caps, what are those or will those be?
|
||||
[7:54pm] <zooko> Zarutian: <http://tahoe-lafs.org/trac/tahoe-lafs/wiki/NewCapDesign>
|
||||
[7:58pm] <Zarutian> zooko: I can answer the question in second point in the section "make them real URIs": the leading // arent required in many uri schemes, it was used to indicate if the uri is hierchical or not.
|
||||
[7:58pm] <davidsarah> right, but we want the URIs to be hierarchical
|
||||
[7:58pm] <zooko> davidsarah: really?
|
||||
[7:58pm] <davidsarah> that's necessary in order for relative URI resolution to work correctly
|
||||
[7:59pm] <zooko> I thought * meant that the thing that comes after * is the "authority" for the rest of it which comes after the next /.
|
||||
[7:59pm] <davidsarah> e.g. you have a web page with a lafs:// uri as its base, and you want relative links in that page to work
|
||||
[7:59pm] <zooko> Would you say that there is an "authority"? Like if that part is a gateway address+port num, or a grid id?
|
||||
[7:59pm] <zooko> What about if the cap is the "authority" and then the path from that cap is the "rest of it". :-)
|
||||
[8:00pm] <zooko> That matches my model of the world fairly nicely. :-)
|
||||
[8:00pm] <davidsarah> whether there is an authority is less important than the resolution algorithm
|
||||
[8:00pm] <Zarutian> davidsarah: really? I thought tahoe URI were like paths through linked namespaces in Gnosis/KeyKos/Eros/Capros
|
||||
[8:00pm] <davidsarah> URI resolution is purely syntactic
|
||||
[8:00pm] » davidsarah finds the relevant spec
|
||||
[8:01pm] <davidsarah> <http://tools.ietf.org/html/rfc3986#section-5>
|
||||
[8:01pm] <Riastradh> zooko, hmm, perhaps you should talk with Jonathan Rees about that. He knows a lot about URIs, their intent, and their interpretation.
|
||||
[8:04pm] <davidsarah> "As relative references can only be used within the context of a hierarchical URI, designers of new URI schemes should use a syntax consistent with the generic syntax's hierarchical components unless there are compelling reasons to forbid relative referencing within that scheme."
|
||||
[8:04pm] <davidsarah> in <http://tools.ietf.org/html/rfc3986#section-1.2.3>
|
||||
[8:04pm] <Riastradh> You don't need an authority in order for a URI to have a hierarchical path component.
|
||||
[8:04pm] <davidsarah> you do need // though, iirc
|
||||
[8:05pm] <Riastradh> No, I don't think so.
|
||||
[8:05pm] <davidsarah> "If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")."
|
||||
[8:05pm] <davidsarah> in section 3.3
|
||||
[8:06pm] <Riastradh> URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]; hier-part = "//" authority path-abempty / path-absolute / path-rootless / path-empty
|
||||
[8:06pm] <Riastradh> Oh, excuse me. When you said `you do need *', did you mean `you do need * for an authority', or `you do need // for a hierarchical path component'?
|
||||
[8:06pm] » zooko reads <http://labs.apache.org/webarch/uri/rfc/rfc3986.html#authority>
|
||||
[8:06pm] <Zarutian> what is an authority component in this context? user:pass@ before the hostname?
|
||||
[8:06pm] <Riastradh> Zarutian, the user info, hostname, and port number.
|
||||
[8:07pm] <Riastradh> Everything between the // and the first / of the path, if any.
|
||||
[8:07pm] <davidsarah> right, usually (although it's strictly speaking scheme-specific)
|
||||
[8:08pm] <zooko> So, this makes it sound like you can have paths without an authority: <http://labs.apache.org/webarch/uri/rfc/rfc3986.html#path>
|
||||
[8:08pm] <zooko> Although, FWIW, I still kind of favor letting the cap itself occupy the "authority" slot...
|
||||
[8:08pm] <Zarutian> zooko: yurl style?
|
||||
[8:08pm] <Riastradh> zooko, see Section 3 `Syntax Components', from which I just quoted a grammar excerpt.
|
||||
[8:08pm] » davidsarah was sure that hierarchical uris required // (and therefore an authority), but is having difficulty finding where it says that
|
||||
[8:08pm] <zooko> Zarutian: yeah, now that you mention it, a bit like!
|
||||
[8:09pm] <zooko> Interesting. :-)
|
||||
[8:09pm] <zooko> Riastradh: yes, I was just looking at Section 3 -- what about it?
|
||||
[8:09pm] <Riastradh> zooko, the hier-part production rule includes options with paths and no authority.
|
||||
[8:10pm] <davidsarah> hmm, maybe this changed since RFC 2396
|
||||
[8:10pm] » davidsarah checks that
|
||||
[8:10pm] <davidsarah> yes, it did
|
||||
[8:10pm] <davidsarah> <http://tools.ietf.org/html/rfc2396#appendix-A>
|
||||
[8:11pm] <davidsarah> an RFC 2396 hierarchical URI requires an authority; an RFC 3986 one does not
|
||||
[8:12pm] <Riastradh> That's not what I see in RFC 2396, davidsarah. absoluteURI = scheme ":" ( hier_part | opaque_part ); hier_part = ( net_path | abs_path ) [ "?" query ]; abs_path = "/" path_segments.
|
||||
[8:13pm] <davidsarah> oh, right, I misread it
|
||||
[8:13pm] <davidsarah> you're correct
|
||||
[8:16pm] <davidsarah> OTOH, if the URI includes a grid id, that would effectively be an authority
|
||||
[8:17pm] <zooko> Funny thing, "authority". :-) I would sort of make gateway and cap the authority.
|
||||
[8:17pm] <Riastradh> That sounds reasonable to me, provided that the `grid id' is in a sufficiently global namespace such as the DNS.
|
||||
[8:17pm] <zooko> But not grid id.
|
||||
[8:17pm] <zooko> grid id determines if your attempt to access it will succeed, but does not determine what contents you'll find on a read or whether you can write.
|
||||
[8:17pm] <zooko> That's all determined by the cap.
|
||||
[8:18pm] <davidsarah> this should be discussed on an archived medium!
|
||||
[8:19pm] <zooko> Yes...
|
||||
[8:21pm] <zooko> Namely #683, I think.
|
||||
[8:21pm] <subm> #683 (handle arbitrary URIs in directories)
|
||||
[8:21pm] <subm> <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/683>
|
||||
[8:21pm] <zooko> Zarutian: would you be willing to update #683 to reflect the conversation from this channel?
|
||||
[8:33pm] <davidsarah> should be #432 I think
|
||||
[8:33pm] <subm> #432 (writing down filecaps: revise URI scheme)
|
||||
[8:33pm] <subm> <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/432>
|
||||
[8:33pm] <davidsarah> see <http://tahoe-lafs.org/trac/tahoe-lafs/query?status=!closed&keywords=~newurls> for all tickets related to new URLs
|
||||
|
||||
-->
|
||||
* according to #683, a URI **identifies** a resource, but does not
|
||||
necessarily provide enough information to actually access it (i.e. if you
|
||||
have a URI and somebody pointed you at a file, you could confidently tell
|
||||
|
|
Loading…
Reference in a new issue