Always flush LLBufferStream objects.
This commit is contained in:
@@ -272,6 +272,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
|
||||
context[CONTEXT_RESPONSE][CONTEXT_HEADERS] = headers;
|
||||
LLBufferStream ostr(channels, buffer.get());
|
||||
LLSDSerialize::toXML(mGoodResult, ostr);
|
||||
ostr << std::flush;
|
||||
|
||||
return STATUS_DONE;
|
||||
}
|
||||
@@ -284,7 +285,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
|
||||
context[CONTEXT_RESPONSE]["statusCode"] = mStatusCode;
|
||||
context[CONTEXT_RESPONSE]["statusMessage"] = mStatusMessage;
|
||||
LLBufferStream ostr(channels, buffer.get());
|
||||
ostr << mStatusMessage;
|
||||
ostr << mStatusMessage << std::flush;
|
||||
|
||||
return STATUS_DONE;
|
||||
}
|
||||
@@ -293,7 +294,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
|
||||
context[CONTEXT_RESPONSE][CONTEXT_HEADERS] = mHeaders;
|
||||
context[CONTEXT_RESPONSE]["statusCode"] = mStatusCode;
|
||||
LLBufferStream ostr(channels, buffer.get());
|
||||
ostr << mStatusMessage;
|
||||
ostr << mStatusMessage << std::flush;
|
||||
|
||||
return STATUS_DONE;
|
||||
}
|
||||
@@ -633,7 +634,7 @@ void LLHTTPResponder::markBad(
|
||||
LLBufferStream out(channels, buffer.get());
|
||||
out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n<html>\n"
|
||||
<< "<title>Bad Request</title>\n<body>\nBad Request.\n"
|
||||
<< "</body>\n</html>\n";
|
||||
<< "</body>\n</html>\n" << std::flush;
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_RESPONDER("HTTP Responder");
|
||||
@@ -926,7 +927,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl(
|
||||
mState = STATE_SHORT_CIRCUIT;
|
||||
str << HTTP_VERSION_STR << " 404 Not Found\r\n\r\n<html>\n"
|
||||
<< "<title>Not Found</title>\n<body>\nNode '" << mAbsPathAndQuery
|
||||
<< "' not found.\n</body>\n</html>\n";
|
||||
<< "' not found.\n</body>\n</html>\n" << std::flush;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user