File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,14 @@ def net_http
3737
3838 def build_uri ( relative_uri , options )
3939 # Need to encode in case of spaces (e.g. /1.0/kb/security/users/Mad Max/roles)
40- encoded_relative_uri = URI ::DEFAULT_PARSER . escape ( relative_uri )
40+ encoded_relative_uri = URI ::DEFAULT_PARSER . regexp [ :UNSAFE ] . match? ( relative_uri ) ? relative_uri : URI :: DEFAULT_PARSER . escape ( relative_uri )
4141 if URI ( encoded_relative_uri ) . scheme . nil?
4242 uri = ( options [ :base_uri ] || KillBillClient ::API . base_uri )
4343 uri = URI . parse ( uri ) unless uri . is_a? ( URI )
4444 # Note: make sure to keep the full path (if any) from URI::HTTP, for non-ROOT deployments
4545 # See https://github.com/killbill/killbill/issues/221#issuecomment-151980263
4646 base_path = uri . request_uri == '/' ? '' : uri . request_uri
47- uri += ( base_path + URI :: DEFAULT_PARSER . escape ( relative_uri ) )
47+ uri += ( base_path + encoded_relative_uri )
4848 else
4949 uri = encoded_relative_uri
5050 uri = URI . parse ( uri ) unless uri . is_a? ( URI )
You can’t perform that action at this time.
0 commit comments