7 ms·
Wow, I missed that. That violates the URI spec, assuming the author(s) were intending to use a URI. https://tools.ietf.org/html/rfc3986 https://tools.ietf.org/
by lost_my_pwd 10y ago
Wow, I missed that. That violates the URI spec, assuming the author(s) were intending to use a URI.
https://tools.ietf.org/html/rfc3986 https://tools.ietf.org/html/rfc3986 (see "3.3. Path").
- drostie 10y agoRight, it intentionally violates the URI spec by appending something to the end of it. The data structure they're storing has a natural pair-of-structures at its top level: data Database = InMemory | LevelDB Path | ViaHTTP URL newtype DataSet = DS Text newtype Hash = Hash Text data Accessor = AccessDS DataSet | AccessValue (Either DataSet Hash) Path type DBAccessor = (Database, Accessor) They elected to basically encode a DBAccessor above as a string which you can split on "::", with the URL above being stored on the left in the case of the ViaHTTP databases.
- aboodman 10y agoThe string wasn't originally intended to be a URI, but I've been subsequently convinced that it would be useful for it to be one. We'll change it eventually.