Sha256: c4b4b5ff57b26d8627638dab106c353b0d7cdbeb1b83325a8d06f6ad7fedc3ed

Contents?: true

Size: 782 Bytes

Versions: 1

Compression:

Stored size: 782 Bytes

Contents

:call-seq:
  beautify_headers(headers) -> hash
 
Convert headers hash into canonical form.

Header names will be converted to lowercase symbols with underscores
instead of hyphens.

Headers specified multiple times will be joined by comma and space,
except for Set-Cookie, which will always be an array.

Per RFC 2616, if a server sends multiple headers with the same key, they
MUST be able to be joined into a single header by a comma. However,
Set-Cookie (RFC 6265) cannot because commas are valid within cookie
definitions. The newer RFC 7230 notes (3.2.2) that Set-Cookie should be
handled as a special case.

http://tools.ietf.org/html/rfc2616#section-4.2
http://tools.ietf.org/html/rfc7230#section-3.2.2
http://tools.ietf.org/html/rfc6265

[Parameters:]

  - *headers* (Hash)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rest-man-1.1.0 _doc/lib/restman/abstract_response/beautify_headers.rdoc