Http-_headers?

IANAE: Ruby or http.
Re: Having issues with http header references.

Regarding the keys in headers:
Firefox sends Capitalized-Hyphenated.
Does Event machine UPCASE?
Generally, is underscore used over hyphen?
Hyphen appears in the RFC headers.
Rack uses lower.case with .period.

Quick look at some gems shows diversity.
Diversity is great, but.

Kirk notes that http headers references in hashname are best as
Constants for performance.
Is there a gem which parses the source of gems, normalising header
references?

MarkT

On Dec 4, 2011, at 3:55 PM, Mark T wrote:

IANAE: Ruby or http.
Re: Having issues with http header references.

Regarding the keys in headers:
Firefox sends Capitalized-Hyphenated.
Does Event machine UPCASE?

It doesn’t matter. HTTP headers are case-insensitive.

Generally, is underscore used over hyphen?

Never. That would be an entirely different header.

Hyphen appears in the RFC headers.
Rack uses lower.case with .period.

These are not HTTP headers, but private data to avoid confusion or
overlap with HTTP headers.

Quick look at some gems shows diversity.
Diversity is great, but.

Kirk notes that http headers references in hashname are best as
Constants for performance.

While there are many generic techniques for improving performance of
ruby code such as using constants you should focus on improving
performance based on measurements instead of blindly making changes.

Is there a gem which parses the source of gems, normalising header references?

This is not necessary.

Thanks Eric,
I was in a tight corner there for a while.
There are larger issues being addressed:

http://soundadvice.id.au/blog/2011/12/06/
Helpful to know.

MarkT

Is there a gem which parses the source of gems, normalising header references?
This is not necessary.
Did this sound serious?! :wink:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs