FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.19k stars 204 forks source link

Make protocol schemes case-insensitive. #8066

Closed mrotteveel closed 2 weeks ago

mrotteveel commented 1 month ago

Currently the protocol schemes in the Firebird 3.0+ connection URLs are case-sensitive (Firebrd/fbclient only accepts the lowercase variant).

Similar to RFC 3986, I think we should handle schemes case-insensitively, where lowercase is the canonical form. See https://www.rfc-editor.org/rfc/rfc3986#section-3.1

In other words, Firebird should accept inet://..., INET://..., inet4://..., INET4://..., inet6://..., INET6://..., xnet://... and XNET://... (and mixed case forms) equally.

AlexPeshkoff commented 1 month ago

On 4/2/24 17:56, Mark Rotteveel wrote:

Currently the protocol schemes in the Firebird 3.0+ connection URLs are case-sensitive (Firebrd/fbclient only accepts the lowercase variant).

Similar to RFC 3986, I think we should handle schemes case-insensitively, where lowercase is the canonical form. See https://www.rfc-editor.org/rfc/rfc3986#section-3.1

In other words, Firebird should accept |inet://...|, |INET://...|, |inet4://...|, |INET4://...|, |inet6://...|, |INET6://...|, |xnet://...| and |XNET://...| (and mixed case forms) equally.

+1

hvlad commented 2 weeks ago

@mrotteveel: should it be backported into v3 and v4 too, what do you think ?

mrotteveel commented 2 weeks ago

@hvlad I think backporting to v4 would be nice to have, backporting to v3 can be skipped.

hvlad commented 2 weeks ago

Backported into v4