mirror of
https://github.com/SFML/SFML.git
synced 2025-02-18 06:18:01 +08:00
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:
parent
0d0889fc2b
commit
4a840d4f48
@ -27,6 +27,8 @@
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Network/Http.hpp>
|
#include <SFML/Network/Http.hpp>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <iterator>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
@ -295,8 +297,7 @@ void Http::Response::FromString(const std::string& Data)
|
|||||||
|
|
||||||
// Finally extract the body
|
// Finally extract the body
|
||||||
myBody.clear();
|
myBody.clear();
|
||||||
while (std::getline(In, Line))
|
std::copy(std::istreambuf_iterator<char>(In), std::istreambuf_iterator<char>(), std::back_inserter(myBody));
|
||||||
myBody += Line + "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user