mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
'@' can exist in url path
This commit is contained in:
parent
0784934520
commit
28ab1230e2
3
HTTP.cpp
3
HTTP.cpp
|
@ -81,7 +81,8 @@ namespace http {
|
|||
}
|
||||
/* user[:pass] */
|
||||
pos_c = url.find('@', pos_p);
|
||||
if (pos_c != std::string::npos) {
|
||||
std::size_t pos_slash = url.find('/', pos_p);
|
||||
if (pos_c != std::string::npos && (pos_slash == std::string::npos || pos_slash > pos_c)) {
|
||||
std::size_t delim = url.find(':', pos_p);
|
||||
if (delim != std::string::npos && delim < pos_c) {
|
||||
user = url.substr(pos_p, delim - pos_p);
|
||||
|
|
Loading…
Reference in a new issue