pjfanning opened a new pull request, #1365:
URL: https://github.com/apache/pekko-http/pull/1365

   ### Motivation
   `LinkParams` rendered values such as `rel=http://example.net/foo` unquoted, 
because only `" ,;"` were treated as reserved (per RFC 5988). [RFC 
8288](https://www.rfc-editor.org/rfc/rfc8288#section-3) obsoletes RFC 5988 and 
requires parameter values that are not a `token` (RFC 7230) to be quoted. `:` 
is not a token character, so URI relation types must be quoted.
   
   ### Modification
   Add `:` to the reserved characters in `LinkParams`, so `rel`, `rev`, 
`title`, `media` and `type` values containing a colon are rendered quoted. 
Parsing still accepts the unquoted form.
   
   ### Result
   `Link: </>; rel="http://example.net/foo"` is rendered instead of `Link: </>; 
rel=http://example.net/foo`. This changes rendered output for values containing 
`:`; RFC 8288-compliant parsers accept both forms.
   
   ### Tests
   - `sbt "http-core/Test/testOnly 
org.apache.pekko.http.impl.model.parser.HttpHeaderSpec"`: 75 passed
   - Same spec without the `LinkValue` change: `Link` test fails (directional)
   - `scalafmt --mode diff-ref=upstream/main`: no changes
   
   ### References
   Port of akka/akka-http#4267 (Apache 2.0 now applies, since the Akka HTTP 
10.6.0 license change date of 2026-10-23). The extra `rev=` parse/render 
assertion is new.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to