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

RobinTail / express-zod-api / 16398948654
100%

Build:
DEFAULT BRANCH: master
Ran 20 Jul 2025 10:34AM UTC
Jobs 6
Files 52
Run time 1min
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

20 Jul 2025 10:33AM UTC coverage: 100.0%. Remained the same
16398948654

push

github

web-flow
feat: `HEAD` method handling (#2816)

Based on #2791 

- MDN:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods/HEAD
- RFC: https://httpwg.org/specs/rfc9110.html#HEAD

> MUST NOT send content in the response

Findings in Express:

- no need to set `app.head()` handler, it's automatically set for all
`app.get()` ones:
  - https://expressjs.com/en/api.html#app.METHOD
- No extra handling required for `res.send()` — it automatically sends
`Content-Length` header instead of response body for requests having
`HEAD` method:
  - https://expressjs.com/en/api.html#res.send
- For streams, `Content-Length` should not be set anyway because of
`Transfer-encoding: chunked`, according to RFC:
  - https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2
  - https://github.com/expressjs/express/issues/2893
- > A sender MUST NOT send a Content-Length header field in any message
that contains a Transfer-Encoding header field.
- HOWEVER, for `HEAD` it SHOULD be there: 
- The relevant nuance is described in [RFC 9110, Section 9.3.2.
HEAD(https://datatracker.ietf.org/doc/html/rfc9110#section-9.3.2):
- > The server SHOULD send the same header fields in response to a HEAD
request as it would have sent if the request had been a GET, except that
the payload header fields (Section 6.4) MAY be omitted. This includes
sending headers such as Content-Length, even though there is no response
body.
- And in [RFC 9110, Section 6.4.1.
Content-Length](https://datatracker.ietf.org/doc/html/rfc9110#section-6.4.1):
- > A server MAY send a Content-Length header field in a response to a
HEAD request (Section 9.3.2; see also Section 9.3.6), indicating the
size of the payload body that would have been sent had the request been
a GET.
- This means that even if a GET response would use chunked encoding and
omit Content-Length, the HEAD response can and should include
Content-Length if the size is known.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-... (continued)

1243 of 1285 branches covered (96.73%)

67 of 67 new or added lines in 10 files covered. (100.0%)

4021 of 4021 relevant lines covered (100.0%)

394.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-22.0.0 - 16398948654.1 20 Jul 2025 10:34AM UTC 52
100.0
GitHub Action Run
2 run-24.0.0 - 16398948654.2 20 Jul 2025 10:34AM UTC 52
100.0
GitHub Action Run
3 run-20.9.0 - 16398948654.3 20 Jul 2025 10:34AM UTC 52
100.0
GitHub Action Run
4 run-24.x - 16398948654.4 20 Jul 2025 10:34AM UTC 52
100.0
GitHub Action Run
5 run-20.x - 16398948654.5 20 Jul 2025 10:34AM UTC 52
100.0
GitHub Action Run
6 run-22.x - 16398948654.6 20 Jul 2025 10:34AM UTC 52
100.0
GitHub Action Run
Source Files on build 16398948654
  • Tree
  • List 52
  • Changed 10
  • Source Changed 10
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #16398948654
  • b1762bf4 on github
  • Prev Build on master (#16387530738)
  • Next Build on master (#16399354057)
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