HTTP::Header

Constants

CANONICAL_HEADER

Matches HTTP header names when in "Canonical-Http-Format"

Public Instance Methods

canonicalize_header(header) click to toggle source

Transform to canonical HTTP header capitalization

# File lib/http/header.rb, line 7
def canonicalize_header(header)
  header.to_s.split(/[\-_]/).map(&:capitalize).join('-')
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.