Skip to content

Commit 1abf1e0

Browse files
committed
Fix bug where trailing slash gets stripped off base URI
1 parent 5b979ad commit 1abf1e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/oai/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def initialize(base_url, options={})
8787
@parser = options.fetch(:parser, 'rexml')
8888

8989
@http_client = options.fetch(:http) do
90-
Faraday.new(:url => @base) do |builder|
90+
Faraday.new(:url => @base.clone) do |builder|
9191
follow_redirects = options.fetch(:redirects, true)
9292
if follow_redirects
9393
count = follow_redirects.is_a?(Fixnum) ? follow_redirects : 5
@@ -219,7 +219,7 @@ def do_resumable(responseClass, verb, opts)
219219

220220
def build_uri(verb, opts)
221221
opts = validate_options(verb, opts)
222-
uri = @base.clone
222+
uri = @base
223223
uri.query = "verb=" << verb
224224
opts.each_pair { |k,v| uri.query << '&' << externalize(k) << '=' << encode(v) }
225225
uri

0 commit comments

Comments
 (0)