mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-08 22:57:52 +00:00
correction
This commit is contained in:
parent
3ec000d0f8
commit
124a9cb030
@ -84,11 +84,11 @@ namespace http {
|
|||||||
pos_c = url.find('@', pos_p); /* find end of 'user' or 'user:pass' part */
|
pos_c = url.find('@', pos_p); /* find end of 'user' or 'user:pass' part */
|
||||||
if (pos_c != std::string::npos && (pos_s == std::string::npos || pos_s > pos_c)) {
|
if (pos_c != std::string::npos && (pos_s == std::string::npos || pos_s > pos_c)) {
|
||||||
std::size_t delim = url.find(':', pos_p);
|
std::size_t delim = url.find(':', pos_p);
|
||||||
if (delim && delim != std::string::npos && delim < pos_c) {
|
if (delim != std::string::npos && delim < pos_c) {
|
||||||
user = url.substr(pos_p, delim - pos_p);
|
user = url.substr(pos_p, delim - pos_p);
|
||||||
delim += 1;
|
delim += 1;
|
||||||
pass = url.substr(delim, pos_c - delim);
|
pass = url.substr(delim, pos_c - delim);
|
||||||
} else {
|
} else if(delim) {
|
||||||
user = url.substr(pos_p, pos_c - pos_p);
|
user = url.substr(pos_p, pos_c - pos_p);
|
||||||
}
|
}
|
||||||
pos_p = pos_c + 1;
|
pos_p = pos_c + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user