Browse Source

Fixes #713 - Use relative_uri when parsing link headers for pagination

Fixes #713 - Use relative_uri when parsing link headers for pagination

Update version and changelog
FORSBERG+two 4 years ago
parent
commit
bf3fc91490
3 changed files with 6 additions and 2 deletions
  1. 4 0
      CHANGELOG.md
  2. 1 1
      lib/shopify_api/pagination_link_headers.rb
  3. 1 1
      lib/shopify_api/version.rb

+ 4 - 0
CHANGELOG.md

@@ -1,3 +1,7 @@
+## Version 9.1.1
+
+* Make cursor based pagination return relative uri's when fetching next and previous pages. [#726](https://github.com/Shopify/shopify_api/pull/726)
+
 ## Version 9.1.0
 
 * Implements equality operator on `Session` [#714](https://github.com/Shopify/shopify_api/pull/714)

+ 1 - 1
lib/shopify_api/pagination_link_headers.rb

@@ -25,7 +25,7 @@ module ShopifyAPI
         url = parts[0][/<(.*)>/, 1]
         rel = parts[1][/rel="(.*)"/, 1]&.to_sym
 
-        url = URI.parse(url)
+        url = URI.parse(url).request_uri
         LinkHeader.new(url, rel)
       end
     end

+ 1 - 1
lib/shopify_api/version.rb

@@ -1,3 +1,3 @@
 module ShopifyAPI
-  VERSION = "9.1.0"
+  VERSION = "9.1.1"
 end