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

`Connection` doesn't offer any way to iterate its contents

Open
#106 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
api

Research direction

Start with the headers::Connection API and its private AsConnectionOption type, then inspect how HeaderMap is expected to support removing referenced headers. Define how callers can iterate the connection options and access the option type, and add coverage showing that the contents can be inspected for gateway processing.

Written by the indexing model from the issue text.

Description

The Connection header lets me test if it contains specific "connection options"[^1] are contained in it. But it doesn't let me actually iterate its contents to see what it contains.

This is very frustrating as I need to actually know what's in the header because I'm implementing a gateway and I need to strip the referenced header names from the request I'm proxying. I would really like to be able to use headers::Connection so I don't have to worry about parsing the comma-separated list myself.

In theory I could just parse the header and then walk the whole headers map and compare each entry to the Connection, except HeaderMap does not offer a retain() operation and so that approach would require reallocating the whole map even if I don't end up making any changes.

[^1]: This is represented as a private impl AsConnectionOption type, which means it's undocumented. Really that should be changed so AsConnectionOption is public and simply inherits from a sealed trait, so the generated docs will at least tell me what implements it. Or maybe change it to use impl AsRef<str> instead, or even impl AsRef<[u8]> as that supports the required comparison too.

Dominant language
Rust
Stars
200
Forks
107
PR merge metrics
No merged PRs in 30d

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 hyperium/headers

All issues in hyperium/headers

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.