ring-clojure / ring-clojure/ring

Make :headers optional in the Ring SPEC Response

Open
#328 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

spec
Dominant language
Clojure
Stars
3.9k
Forks
528
PR merge metrics
No merged PRs in 30d

Description

Setting :headers is mandatory in the Ring SPEC for responses. As it is effectively the same as not setting the :headers at all (which is both less code & faster), I propose it's made optional. This would not be even a breaking change?

In the era of clojure.spec and ring-spec, we get failures for this.

Related: https://github.com/metosin/reitit/issues/83#issuecomment-390884995

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading the response requirements in the linked Ring SPEC, then inspect the ring-spec validation context referenced in the issue. Confirm how responses without :headers are handled and update the relevant specification and checks; done means such responses conform without failures while existing header behavior remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
api, backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.