jakartaee / rest

Jakarta RESTful Web Services
Other
353 stars 114 forks source link

Allow the host to be set and do not require the protocol to return HT… #1098

Closed jamezp closed 2 years ago

jamezp commented 2 years ago

…TP in all uppercase.

Again if this needs an issue file please let me know.

For the HOST change I don't think it's generally safe to assume localhost will work on all environments, e.g. CI.

mkarg commented 2 years ago

NB: Apparently localhost is covered by https://datatracker.ietf.org/doc/html/rfc6761 hence a mandatory Internet Standard.

jamezp commented 2 years ago

The host I've got no strong argument for. I can see where using localhost is fine, but I've definitely seen issues in some environments before. Maybe not a big deal here though.

The HTTP I respectively disagree with. If it was meant to be "HTTP" then the protocol should be represented by a type not a String. Requiring a specific string in a specific case is bad practice IMO.

mkarg commented 2 years ago

Regarding "HTTP" the explicit uppercase is enforced by the commonly accepted API already. This is not the schema string, this is the protocol name. If e. g. a product supports HTTP/3 then the schema still is lowercase "http" but to enforce it, the protocol name needs to be "HTTP/3" vs "HTTP". Maybe it is more clear now?

Please note that the time to change the API is over. It is discussed and accepted. The TCK only enforces the API as-is.

jamezp commented 2 years ago

I can't say I fully agree, but it's not really that big of a deal so I'll just close this.