diff --git a/src/io.c b/src/io.c index b76b8f2a..7d63ea66 100644 --- a/src/io.c +++ b/src/io.c @@ -577,16 +577,17 @@ int io_open(IO_PRIVHANDLE *phandle, char *fmt, ...) { proto_part = uri_copy; } - if(path_part) - io_urldecode(path_part); - /* find the start of the options */ options_part = strchr(path_part,'?'); if(options_part) { *options_part = '\0'; options_part++; + io_urldecode(options_part); } + if(path_part) + io_urldecode(path_part); + /* see if we can generate a list of options */ while(options_part) { key = options_part;