Skip to content

Commit

Permalink
Merge pull request #28 from mjsuhonos/master
Browse files Browse the repository at this point in the history
Fix bug where trailing slash gets stripped off base URI.
  • Loading branch information
mjsuhonos committed May 31, 2013
2 parents 5b979ad + 1abf1e0 commit 18bf575
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/oai/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def initialize(base_url, options={})
@parser = options.fetch(:parser, 'rexml')

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

def build_uri(verb, opts)
opts = validate_options(verb, opts)
uri = @base.clone
uri = @base
uri.query = "verb=" << verb
opts.each_pair { |k,v| uri.query << '&' << externalize(k) << '=' << encode(v) }
uri
Expand Down

0 comments on commit 18bf575

Please sign in to comment.