• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

httprb / http / 1732
94%

Build:
DEFAULT BRANCH: master
Ran 19 Dec 2019 09:30PM UTC
Jobs 1
Files 33
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1732

push

travis-ci

ixti
Preserve header casing

The original behavior was to normalize all header names so that they
were broken up into words, delimited by `-` or `_`, capitalize each word,
and then join the words together with a `-`.

This made it impossible to make a request with an underscore in the header
name, or with a different casing (ex: all caps).

However, the normalized name made it possible to access (or delete) headers,
without having to know the exact casing.

The new behavior is based on the following rules (as specified in https://github.com/httprb/http/issues/524#issuecomment-460014322)

1) Fail if a header name is not specified as a String or Symbol
2) If the header name is specified as a Symbol, normalize it when writing it in a request.
If the header name is specified as a String, preserve it as-is when writing it in a request.
3) Allow lookup of any header using the normalized form of the name

I implemented this behavior by storing three elements for each header value:
1) normalized header name
2) header name as it will be written in a request
3) header value

Element 2 is the new addition. I considered just storing the header value
as it would be written, and only doing normalization during lookup, but
it seemed wasteful to potentially normalize the same value over and over
when searching through the list for various lookups. This way we only
normalize each name once, and can continue to use that value for lookups.
However, whenever asked for the contents (ex: via `each` or `keys`) we
return the new, non-normalized name.

Fixes: https://github.com/httprb/http/issues/524

14 of 14 new or added lines in 1 file covered. (100.0%)

1341 of 1412 relevant lines covered (94.97%)

117.56 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1732.1 (jruby-9.2.5.0, JRUBY_OPTS="$JRUBY_OPTS --debug") 19 Dec 2019 09:30PM UTC 0
94.97
Travis Job 1732.1
Source Files on build 1732
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1732
  • 8a236fe4 on github
  • Prev Build on master (#1722)
  • Next Build on master (#1734)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc