------------------------------------------------------------
revno: 2606
committer: eMTee <[email protected]>
branch nick: dcplusplus
timestamp: Wed 2011-09-07 20:31:43 +0200
message:
url parser fixes
modified:
dcpp/Util.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/Util.cpp'
--- dcpp/Util.cpp 2011-08-20 14:45:57 +0000
+++ dcpp/Util.cpp 2011-09-07 18:31:43 +0000
@@ -480,9 +480,9 @@
return;
}
- host = url.substr(authorityStart, hostEnd - authorityStart);
+ host = url.substr(authorityStart + 1, hostEnd - authorityStart - 1);
if(hostEnd + 1 < url.size() && url[hostEnd + 1] == ':') {
- portStart = hostEnd + 1;
+ portStart = hostEnd + 2;
}
} else {
size_t hostEnd;
@@ -519,7 +519,7 @@
dcdebug("\n");
path = url.substr(fileStart, fileEnd - fileStart);
query = url.substr(queryStart, queryEnd - queryStart);
- fragment = url.substr(fragmentStart, fragmentStart);
+ fragment = url.substr(fragmentStart, fragmentEnd - fragmentStart);
}
map<string, string> Util::decodeQuery(const string& query) {
_______________________________________________
Mailing list: https://launchpad.net/~linuxdcpp-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~linuxdcpp-team
More help : https://help.launchpad.net/ListHelp