Fixed extra empty line at end of Http::Response body

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1431 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-02-28 22:51:50 +00:00
parent 0d0889fc2b
commit 4a840d4f48

View File

@ -27,6 +27,8 @@
////////////////////////////////////////////////////////////
#include <SFML/Network/Http.hpp>
#include <ctype.h>
#include <algorithm>
#include <iterator>
#include <sstream>
@ -295,8 +297,7 @@ void Http::Response::FromString(const std::string& Data)
// Finally extract the body
myBody.clear();
while (std::getline(In, Line))
myBody += Line + "\n";
std::copy(std::istreambuf_iterator<char>(In), std::istreambuf_iterator<char>(), std::back_inserter(myBody));
}