changed method to strip newlines as Android complained.

This commit is contained in:
Carsten Sandtner 2013-05-14 17:21:27 +02:00
parent a7e0a83a2e
commit 919c347c6d
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ void MinXmlHttpRequest::_gotHeader(string header) {
http_value = header.substr(found_header_field+1, header.length()); http_value = header.substr(found_header_field+1, header.length());
// Get rid of all \n // Get rid of all \n
http_value.erase(std::remove(http_value.begin(), http_value.end(), '\n'), http_value.end()); if (!http_value.empty() && http_value[http_value.size() - 1] == '\n') {
http_value.erase(http_value.size() - 1);
}
http_header[http_field] = http_value; http_header[http_field] = http_value;