lib/ronin/network/http/http.rb in ronin-support-0.1.0.rc1 vs lib/ronin/network/http/http.rb in ronin-support-0.1.0.rc2

- old
+ new

@@ -180,10 +180,13 @@ # # @return [String] # The camel-case HTTP header name. # def HTTP.header_name(name) - name.to_s.split(/[\s+_-]/).map { |word| word.capitalize }.join('-') + words = name.to_s.split(/[\s+_-]/) + + words.each { |word| word.capitalize! } + return words.join('-') end # # Converts underscored, dashed, lowercase and uppercase HTTP headers # to standard camel-cased HTTP headers.