Skip to content

Commit

Permalink
connect_uri: pct_decode the path
Browse files Browse the repository at this point in the history
On Windows for example:

  path (make ~path:"C:\\cygwin" ())) -> "C:%5Ccygwin"

  pct_decode @@ path @@ make ~path:"C:\\cygwin" () -> "C:\\cygwin"

Signed-off-by: David Scott <[email protected]>
  • Loading branch information
djs55 committed Sep 20, 2016
1 parent 962c29d commit 6e36685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/block.ml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ let connect name =
connect_common config

let connect_uri uri =
let path = Uri.path uri in
let path = Uri.(pct_decode @@ path uri) in
let params = Uri.query uri in
let buffered = try List.assoc "buffered" params = [ "1" ] with Not_found -> false in
let sync = try List.assoc "sync" params = [ "1" ] with Not_found -> false in
Expand Down

0 comments on commit 6e36685

Please sign in to comment.