The GitHub Actions job "Validate and test" on 
pekko-http.git/empty-list-elements has succeeded.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
e796afd1256cfd176a4a5d61eda3f1068df496fd / PJ Fanning 
<[email protected]>
fix: accept empty list elements in HTTP header lists

Motivation:
RFC 9110 section 5.6.1 says a recipient must parse and ignore a
reasonable number of empty list elements. The header list rules used
`oneOrMore(...).separatedBy(listSep)` or the `zeroOrMore` equivalent,
which reject them, so values such as `Cache-Control: no-store,, public`
or `Connection: close,, foo` stayed `RawHeader`s; an unrecognised
`close` could change connection handling.

Modification:
`listSep` now takes up empty interior elements, and new `listStart`
and `listEnd` rules take up leading and trailing ones. Every header
list rule that ends at `EOI` uses them, replacing the ad hoc leading
comma handling in `Accept-Ranges` and `Range`. Empty elements do not
count towards a `1#element` list, so a list such as `Cache-Control: ,`
is still not parsed. Add a migration guide entry.

Result:
Interior, leading and trailing empty list elements are ignored and the
headers parse into their modelled types.

Tests:
sbt "http-core/testOnly org.apache.pekko.http.impl.model.parser.*"
sbt "http-core/testOnly org.apache.pekko.http.impl.engine.parsing.*"
sbt "http-tests/testOnly 
org.apache.pekko.http.scaladsl.server.directives.RangeDirectivesSpec 
org.apache.pekko.http.scaladsl.server.directives.CacheConditionDirectivesSpec"
sbt "http-core/mimaReportBinaryIssues"

References:
Fixes #1396

Report URL: https://github.com/apache/pekko-http/actions/runs/42476304272

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to