From 4a840d4f48263580d6d5fd29fe3e21a31ea6ede1 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Sun, 28 Feb 2010 22:51:50 +0000 Subject: [PATCH] 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 --- src/SFML/Network/Http.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SFML/Network/Http.cpp b/src/SFML/Network/Http.cpp index cba960cb3..4a9502fce 100644 --- a/src/SFML/Network/Http.cpp +++ b/src/SFML/Network/Http.cpp @@ -27,6 +27,8 @@ //////////////////////////////////////////////////////////// #include #include +#include +#include #include @@ -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(In), std::istreambuf_iterator(), std::back_inserter(myBody)); }