File: normalize_uri.rb

package info (click to toggle)
ruby-http 4.4.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 676 kB
  • sloc: ruby: 5,384; makefile: 9
file content (17 lines) | stat: -rw-r--r-- 322 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require "http/uri"

module HTTP
  module Features
    class NormalizeUri < Feature
      attr_reader :normalizer

      def initialize(normalizer: HTTP::URI::NORMALIZER)
        @normalizer = normalizer
      end

      HTTP::Options.register_feature(:normalize_uri, self)
    end
  end
end