Skip to content

Commit

Permalink
temporary fix for bad URI error
Browse files Browse the repository at this point in the history
  • Loading branch information
nvdk committed Nov 8, 2024
1 parent 02fc6fa commit 9375a43
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
source 'https://rubygems.org' do
gem 'listen', '~> 3.0'
gem 'parallel', '~> 1.17.0'
gem "concurrent-ruby", "~> 1.1"
# matching our current backend setup
gem "elasticsearch", "~> 7.17"
gem "faraday-typhoeus", "~> 1.1"
gem "pry-debugger-jruby", "~> 2.1"
end

gem "faraday-typhoeus", "~> 1.1"
13 changes: 13 additions & 0 deletions web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
require_relative 'framework/tika.rb'
require_relative 'framework/jsonapi.rb'

# this monkeypatch is to resolve an odd issue
# in webrick 1.8.1 the constant URI::REGEXP::PATTERN::HOST is used
# but this does not seem to exist in our template. so we replace it with
# URI::REGEXP::PATTERN::HOSTNAME . unclear why this shows up on this branch
module WEBrick
class HTTPRequest
def parse_host_request_line(host)
pattern = /\A(#{URI::REGEXP::PATTERN::HOSTNAME})(?::(\d+))?\z/no
host.scan(pattern)[0]
end
end
end

##
# WEBrick setup
##
Expand Down

0 comments on commit 9375a43

Please sign in to comment.