Skip to content

Commit

Permalink
Merge remote-tracking branch 'purple/openssl'
Browse files Browse the repository at this point in the history
  • Loading branch information
majestrate committed Jun 30, 2016
2 parents dabdc8e + 28ab123 commit 1362177
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions HTTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,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);
Expand All @@ -94,7 +95,7 @@ namespace http {
} else {
user = url.substr(pos_p, pos_c - pos_p);
}
pos_p = pos_c + 1;
pos_p = pos_c + 1;
}
/* hostname[:port][/path] */
pos_c = url.find_first_of(":/", pos_p);
Expand Down

0 comments on commit 1362177

Please sign in to comment.