Repository navigation
Conversation
pjfanning
left a comment
There was a problem hiding this comment.
-
pekko.http.client.http2.send-asterisk-optionsis read once fromsystem.settings.configinHttp2Extand threaded through as a boolean, bypassingHttp2ClientSettings. It lives in the config block thatHttp2ClientSettingsparses but has no Scala/Java accessor orwithXxx. A client passing its ownClientConnectionSettingscannot turn it on or off per connection, so an application talking to one peer that accepts*and one that does not cannot configure them differently - which is the compatibility concern that motivates making it opt-in. -
The existing
clientStack(...)/httpLayerClient(...)overloads are kept and hard-codesendAsteriskOptions = false, so anything building the stack through them (several specs and the benchmark do) silently ignores the config. Deriving the flag from the settings object insideclientStackwould fix both points.
Motivation A client may talk to peers with different support for the server-wide OPTIONS target. A system-wide setting cannot represent that difference. Modification Expose the default-off setting through the Scala and Java HTTP/2 client settings, use it in the existing client stack, and preserve resource paths, query targets and explicit target choices. Document both configuration and the per-connection override. Result Direct and managed connections honor their settings without changing the default request target or HTTP/1.1 behavior. The focused transport and rendering cases pass on Scala 2.13 and Scala 3. References Refs apache#1732.
babc87e to
82d213b
Compare
82d213b to
ac28218
Compare
Motivation: Allow a client to opt into sending the asterisk form without changing the default. Modification: Expose per-client settings in Scala and Java and preserve the existing renderer wiring. Add a Java test for both override directions. Result: The focused Java API test and official formatting passed on JDK 17. References: RFC 9113 §8.3.1; review feedback in apache#1732
ac28218 to
3924b80
Compare
Motivation
HTTP/2 distinguishes server-wide OPTIONS from OPTIONS on a resource. Applications need a way to choose the server-wide form for a connection without changing what existing clients send.
Modification
Add
pekko.http.client.http2.send-asterisk-options, disabled by default, and expose it through the Scala and Java client connection settings. The direct and managed HTTP/2 clients honor the settings passed to their connection builders. When enabled, an absolute HTTP(S) OPTIONS URI with neither a path nor a query renders as*. A resource path, an explicit query (even an empty one), and an explicit raw request target keep their existing handling.Result
Applications can opt in for individual peers. The default remains
/for an authority-only OPTIONS URI, and HTTP/1.1 and inbound server handling are unchanged.References
RFC 9113 §8.3.1 and erratum 9175, held for document update.
Refs #981 (separate inbound HTTP/2 OPTIONS support; not a prerequisite).