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)); }