mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
fix(URI): don't lowercase host part if it's a Unix domain socket #4468
This commit is contained in:
parent
a5b3c84874
commit
e078dbb84e
@ -857,7 +857,8 @@ void URI::parseHostAndPort(std::string::const_iterator& it, const std::string::c
|
||||
}
|
||||
else _port = 0;
|
||||
_host = host;
|
||||
toLowerInPlace(_host);
|
||||
if (_host.size() && _host[0] != '%')
|
||||
toLowerInPlace(_host);
|
||||
}
|
||||
|
||||
|
||||
|
@ -798,6 +798,15 @@ void URITest::testOther()
|
||||
assertTrue (uri.getRawFragment() == "foo%2Fbar");
|
||||
assertTrue (uri.toString() == "http://google.com/search?q=hello+world#foo%2Fbar");
|
||||
assertTrue (uri.getPathEtc() == "/search?q=hello+world#foo%2Fbar");
|
||||
|
||||
uri = "http://ServerSocket.com/index.html";
|
||||
assertTrue (uri.toString() == "http://serversocket.com/index.html");
|
||||
|
||||
uri = "http+unix://%2Ftmp%2FServerSocket/index.html";
|
||||
assertTrue (uri.toString() == "http+unix://%2Ftmp%2FServerSocket/index.html");
|
||||
std::string decoded;
|
||||
uri.decode("http+unix://%2Ftmp%2FServerSocket/index.html", decoded);
|
||||
assertTrue (decoded == "http+unix:///tmp/ServerSocket/index.html");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user