From: <ag...@us...> - 2011-12-14 20:48:20
|
Revision: 2644 http://zoolib.svn.sourceforge.net/zoolib/?rev=2644&view=rev Author: agreen Date: 2011-12-14 20:48:14 +0000 (Wed, 14 Dec 2011) Log Message: ----------- Slight change in parsing, so we only return the URL in hostAndPort if there were no slashes in it, so we cans till use this for interpreting CONNECT requests, but can also handle partial URLs. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZHTTP.cpp Modified: trunk/zoolib/source/cxx/zoolib/ZHTTP.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZHTTP.cpp 2011-12-14 20:47:12 UTC (rev 2643) +++ trunk/zoolib/source/cxx/zoolib/ZHTTP.cpp 2011-12-14 20:48:14 UTC (rev 2644) @@ -1339,9 +1339,11 @@ } string hostAndPort; - const size_t slashOffset = iURL.find('/', start); + size_t slashOffset = iURL.find('/', start); if (string::npos != slashOffset) { + if (start == 0) + slashOffset = 0; hostAndPort = iURL.substr(start, slashOffset - start); if (oPath) *oPath = iURL.substr(min(iURL.size(), slashOffset)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |