httpwg / http-extensions

HTTP Extensions in progress
https://httpwg.org/http-extensions/
431 stars 142 forks source link

connect-tcp: target_host list feature seems broken #2715

Closed DavidSchinazi closed 7 months ago

DavidSchinazi commented 7 months ago

connect-tcp makes the target_host variable a list, which is a feature that connect-udp didn't have. I'm not an expert of URI templates, but this doesn't seem correct. The feature definition links to composite values from RFC 6570, but those require a * in the template - which is something that the document does not use in its examples nor the default template. Additionally, an example in connect-tcp uses :path = /proxy?target_host=192.0.2.1,2001:db8::1&tcp_port=443 whereas the notation from RFC 6570 would be :path = /proxy?target_host=192.0.2.1&target_host=2001:db8::1&tcp_port=443

bemasc commented 7 months ago

No, the * is optional. Section 3.2.1 says:

If there is no explode modifier, the expansion consists of a comma-separated concatenation of the defined member string values.

This is what is shown in the example.

I've adjusted the reference (https://github.com/httpwg/http-extensions/commit/6923144327ef12fe1eefe88c2a132a538a0eff16) to point to a different section of RFC 6570.

DavidSchinazi commented 7 months ago

Thanks for clarifying