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

go-goyave / goyave / 34209356739
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: fix/compress-quality-zero
DEFAULT BRANCH: master
Ran 08 Sep 2026 09:23AM UTC
Jobs 1
Files 100
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

08 Sep 2026 09:19AM UTC coverage: 97.141% (+0.004%) from 97.137%
34209356739

Pull #295

github

System-Glitch
httputil: fix quality value parsing in ParseMultiValuesHeader

The quality value regex in util/httputil/httputil.go matched everything
located after the first ";" in a header value against
`^q=([01]\.[0-9]{1,3})$`. Anything that did not match fell back to a
priority of 0, which sorts the value last instead of first. Three shapes
allowed by RFC 9110 do not match that regex:
  - optional whitespace after the ";", e.g. "gzip; q=0.9"
  - a quality value with no fraction, e.g. "gzip;q=1"
  - a "q" parameter that is not first, e.g. "text/html;charset=utf-8;q=0.9"

Both callers got the client's preference backwards as a result.
"Accept-Encoding: gzip;q=1, br;q=0.9" made compress.Middleware.getEncoder
return br, and "Accept-Language: en-US;q=0.5, fr-FR; q=0.9" made
lang.Languages.DetectLanguage return en-US.

Walk the parameter list and read the "q" parameter from it instead of
matching the list as a whole, and accept the integer forms of a quality
value. A value with no "q" parameter now has a priority of 1, the RFC
9110 default, which is already what a value with no parameters gets.
Pull Request #295: httputil: fix quality value parsing in ParseMultiValuesHeader

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

5674 of 5841 relevant lines covered (97.14%)

273.65 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34209356739.1 08 Sep 2026 09:23AM UTC 100
97.14
GitHub Action Run
Source Files on build 34209356739
  • Tree
  • List 100
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #295
  • PR Base - master (#33851120765)
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