[DRIVERS-959] Connection string spec does not define how to "URL decode" Created: 29/Nov/19  Updated: 31/Mar/22

Status: Backlog
Project: Drivers
Component/s: Connection String
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Oleg Pudeyev (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to RUBY-1775 Make driver Ruby warning-clean Closed

 Description   

It appears that over the years, the definition of "URL encoding" has changed. for example this Ruby ticket (https://bugs.ruby-lang.org/issues/4167) claims that # went from being unreserved in RFC 2396 to being reserved in RFC 3986.

The connection string spec says:

> It should be noted that while the connection string specification is inspired by the URI specification as described in RFC 3986 and uses similar terminology, it does not conform to that specification.

Later, the spec says on several occasions that values must be "URL decoded" but does not define what URL decoding it references, for example whether it's RFC 3986 URL decoding or the URL decoding of whatever the current URI RFC is, or whatever the URL decoding of the particular driver language is.

In Ruby driver we have had a PR proposing changing the method used for URL decoding from one that does not transform + to space to the one that does (https://github.com/mongodb/mongo-ruby-driver/pull/1596). Given that connection string spec does not specify which URL encoding definition it uses, it is unclear whether we can perform + to space conversion while URL decoding, for example.

I think it will be beneficial to the drivers to use a definition of URL encoding that is in the current URI RFC (i.e. RFC 3986) if possible to permit them using the respective standard libraries' utilities for performing URL decoding.


Generated at Thu Feb 08 08:22:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.