diff --git a/Library/Homebrew/livecheck/strategy/page_match.rb b/Library/Homebrew/livecheck/strategy/page_match.rb
index 230060a64d2e658c4e7725747fcf327222aab6f7..49961eff59da3ccde0d9d6fac4c4eb34fcb0268a 100644
--- a/Library/Homebrew/livecheck/strategy/page_match.rb
+++ b/Library/Homebrew/livecheck/strategy/page_match.rb
@@ -47,7 +47,7 @@ module Homebrew
         #   content
         # @return [Array]
         def self.page_matches(url, regex)
-          page = URI.open(url).read
+          page = URI.parse(url).open.read
           matches = page.scan(regex)
           matches.map(&:first).uniq
         end
diff --git a/Library/Homebrew/livecheck/strategy/xorg.rb b/Library/Homebrew/livecheck/strategy/xorg.rb
index 657085092a94de20bc829517f2b12b439ea76e2d..18417207b0b879d5054205e6e33d11675d30e4a9 100644
--- a/Library/Homebrew/livecheck/strategy/xorg.rb
+++ b/Library/Homebrew/livecheck/strategy/xorg.rb
@@ -87,7 +87,7 @@ module Homebrew
           match_data = { matches: {}, regex: regex, url: page_url }
 
           # Cache responses to avoid unnecessary duplicate fetches
-          @page_data[page_url] = URI.open(page_url).read unless @page_data.key?(page_url)
+          @page_data[page_url] = URI.parse(page_url).open.read unless @page_data.key?(page_url)
 
           matches = @page_data[page_url].scan(regex)
           matches.map(&:first).uniq.each do |match|