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

go-pkgz / rest / 32195022949
97%

Build:
DEFAULT BRANCH: master
Ran 18 Aug 2026 10:58PM UTC
Jobs 1
Files 25
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

18 Aug 2026 10:56PM UTC coverage: 97.078% (+0.002%) from 97.076%
32195022949

push

github

web-flow
Handle If-None-Match correctly in CacheControl (#50)

* fix: handle If-None-Match correctly in CacheControl

Previously the header was tested with strings.Contains against the whole raw
value, and a match returned 304 for any method. That answered 304 to PUT, POST
and DELETE requests, where RFC 9110 expects the precondition to be evaluated
rather than a not-modified reply, and it silently swallowed the precondition
instead of letting the handler act on it.

Conditional handling is now limited to GET and HEAD, and the header is parsed as
a tag list so that comma-separated values and the W/ prefix are understood and a
tag matches only in full. The * wildcard asks whether any representation exists,
which the middleware can't know before the handler runs, so it is left to the
handler.

CacheControl now delegates to CacheControlDynamic, the two had identical bodies.

* docs: document the CacheControl middleware

* fix: read every If-None-Match field and yield to stronger preconditions

Header.Get returned only the first If-None-Match field, so a client splitting
the list across repeated fields had a matching tag missed. All fields are read
now, as they form a single list.

A matching tag also answered 304 even when If-Match or If-Unmodified-Since was
present. Those outrank If-None-Match and can require a 412 that only the handler
can determine, so such requests are passed through instead.

21 of 21 new or added lines in 1 file covered. (100.0%)

1495 of 1540 relevant lines covered (97.08%)

48.62 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32195022949.1 18 Aug 2026 10:58PM UTC 25
97.08
GitHub Action Run
Source Files on build 32195022949
  • Tree
  • List 25
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 5de8db44 on github
  • Prev Build on master (#29966545475)
  • Next Build on master (#32197043514)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc