Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Config headers to not be capitalized

Open
#143 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
api

Research direction

Start at the Net::HTTP.new entry point and inspect how request headers are currently capitalized. Define the configuration behavior so the default remains unchanged while an enabled option preserves supplied header casing, then verify the existing header behavior and the new option.

Written by the indexing model from the issue text.

Description

Context

I am consuming a API that have case sensitive header keys.
It is not common to see an case-sensitive header and also is off the specification. But sometimes it is off our control.

What I have in mind is some config to making possible to prevent the capitalize behavior and pass the header without changing it. Something like this:

http = Net::HTTP.new(endpoint.host, endpoint.port)
http.preserve_headers = true

The default behavior will remain the same, the idea is only change the behavior if this config are true.

Some workaround I can do is making a monkeypath to prevent the capitalization, but I thing it make sense to have this configuration.

I can try to implement it, but I want to know if make sense for Net::HTTP.

Dominant language
Ruby
Stars
148
Forks
95
Avg merge
10h 54m
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ruby/net-http

All issues in ruby/net-http

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.