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

httprb / http / 1732 / 1
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 19 Dec 2019 09:30PM UTC
Files 33
Run time 2s
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

19 Dec 2019 09:25PM UTC coverage: 94.972% (+0.02%) from 94.95%
jruby-9.2.5.0, JRUBY_OPTS="$JRUBY_OPTS --debug"

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

1341 of 1412 relevant lines covered (94.97%)

117.56 hits per line

Source Files on job 1732.1 (jruby-9.2.5.0, JRUBY_OPTS="$JRUBY_OPTS --debug")
  • Tree
  • List 0
  • Changed 8
  • Source Changed 1
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1717
  • Travis Job 1732.1
  • 8a236fe4 on github
  • Prev Job for jruby-9.2.5.0, JRUBY_OPTS="$JRUBY_OPTS --debug" on master (#1722.1)
  • Next Job for jruby-9.2.5.0, JRUBY_OPTS="$JRUBY_OPTS --debug" on master (#1734.1)
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