• Levin Zimmermann's avatar
    client: Adjust URI scheme to move client-specific options to fragment · ae571d96
    Levin Zimmermann authored
    This is the NEO/go patch part of
    kirr/neo@4c9414ea.
    
    The rationale for this move is described there:
    
    -------------------8>--------------------
    
    For example option `compress` controls kind of compression that _client_
    performs when saving data to server. Similarly cache-size, logfile and
    read-only adjust on-client behaviour, not server.
    
    From nexedi/neoppod!18 (comment 124725) :
    
        In general the most correct thing to do is:
    
        - use host part for where to connect (host:port, list of host ports, UNIX socket, etc)
        - use path part to identify a database or other on-server resource
        - use query part for parameters that are passed to remote server (e.g. `storage` in case of ZEO)
        - use fragment part for local parameters that are not passed to remote server (e.g. local `logfile`)
        - use credentials part for things required to authenticate/encrypt.
    
        To normalize an URL wcfs client would drop credentials and fragment, but keep host, path and query.
    
        Fragments are documented not to be sent to remote side and to be evaluated by local side only.
    
    -> Move options that control client behaviour to fragment.
    
    -------------------<8--------------------
    ae571d96
client_test.go 17.5 KB