File: http_parser.rb

package info (click to toggle)
ruby-http-parser.rb 0.6.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 376 kB
  • sloc: java: 431; ansic: 412; ruby: 355; makefile: 20
file content (20 lines) | stat: -rw-r--r-- 427 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'ruby_http_parser'

Http = HTTP

module HTTP
  class Parser
    class << self
      attr_reader :default_header_value_type

      def default_header_value_type=(val)
        if (val != :mixed && val != :strings && val != :arrays)
          raise ArgumentError, "Invalid header value type"
        end
        @default_header_value_type = val
      end
    end
  end
end

HTTP::Parser.default_header_value_type = :mixed