Closed sakurai-youhei closed 4 years ago
I understood rfc3986 to dictate that all components except for the password should be case insensitive on the server-side and rendered to lowercase when processing programatically. Whether that's right or not, you have a use case where this is causing an issue so let me see if 1) I'm mistaken and 2) if I can offer you at least a switch to preserve case.
RFC7230 (draft) calls for the host and scheme to be normalized to lowercase and the path to be case-sensitive. I can't find a reason to not preserve the case. I'll see if I can get this in the dev branch tonight or tomorrow.
It seemed fairly straightforward so I went ahead and merged to master. Thank you for bringing it up.
The path is always converted to lower case at https://github.com/lbussy/LCBUrl/blob/1.1.0/src/LCBUrl.cpp#L391, however, the conversion causes rejection by some web servers such as Amazon S3.
Original URL https://example.com/Case/Sensitive/Path Current path given by getPath()
case/sensitive/path
Expected path given by getPath()Case/Sensitive/Path