summaryrefslogtreecommitdiff
path: root/indra/llmessage/llhttpsdhandler.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-05-15 12:18:31 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-05-15 12:18:31 -0400
commit7ccf02515ad3f9e3bf795d651fe4b3c0d773f353 (patch)
treec4adc897c07f652e617e91fbf41c12b823acc808 /indra/llmessage/llhttpsdhandler.cpp
parent1abf5f18d6afc7ae9e1b1562b92e5c1ce33b722f (diff)
parente7eced3c87310b15ac20cc3cd470d67686104a14 (diff)
Merge commit 'e7eced3' into lua-timers for whitespace fixes.
Diffstat (limited to 'indra/llmessage/llhttpsdhandler.cpp')
-rw-r--r--indra/llmessage/llhttpsdhandler.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/indra/llmessage/llhttpsdhandler.cpp b/indra/llmessage/llhttpsdhandler.cpp
index 648bc5cfd8..1c5928e187 100644
--- a/indra/llmessage/llhttpsdhandler.cpp
+++ b/indra/llmessage/llhttpsdhandler.cpp
@@ -42,36 +42,36 @@ LLHttpSDHandler::LLHttpSDHandler()
void LLHttpSDHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response)
{
- LLCore::HttpStatus status = response->getStatus();
+ LLCore::HttpStatus status = response->getStatus();
- if (!status)
- {
- this->onFailure(response, status);
- }
- else
- {
- LLSD resplsd;
- const bool emit_parse_errors = false;
+ if (!status)
+ {
+ this->onFailure(response, status);
+ }
+ else
+ {
+ LLSD resplsd;
+ const bool emit_parse_errors = false;
- bool parsed = !((response->getBodySize() == 0) ||
- !LLCoreHttpUtil::responseToLLSD(response, emit_parse_errors, resplsd));
+ bool parsed = !((response->getBodySize() == 0) ||
+ !LLCoreHttpUtil::responseToLLSD(response, emit_parse_errors, resplsd));
- if (!parsed)
- {
- // Only emit a warning if we failed to parse when 'content-type' == 'application/llsd+xml'
- LLCore::HttpHeaders::ptr_t headers(response->getHeaders());
- const std::string *contentType = (headers) ? headers->find(HTTP_IN_HEADER_CONTENT_TYPE) : NULL;
+ if (!parsed)
+ {
+ // Only emit a warning if we failed to parse when 'content-type' == 'application/llsd+xml'
+ LLCore::HttpHeaders::ptr_t headers(response->getHeaders());
+ const std::string *contentType = (headers) ? headers->find(HTTP_IN_HEADER_CONTENT_TYPE) : NULL;
- if (contentType && (HTTP_CONTENT_LLSD_XML == *contentType))
- {
- std::string thebody = LLCoreHttpUtil::responseToString(response);
+ if (contentType && (HTTP_CONTENT_LLSD_XML == *contentType))
+ {
+ std::string thebody = LLCoreHttpUtil::responseToString(response);
- LL_WARNS() << "Failed to deserialize . " << response->getRequestURL() << " [status:" << response->getStatus().toString() << "] "
- << " body: " << thebody << LL_ENDL;
- }
- }
+ LL_WARNS() << "Failed to deserialize . " << response->getRequestURL() << " [status:" << response->getStatus().toString() << "] "
+ << " body: " << thebody << LL_ENDL;
+ }
+ }
- this->onSuccess(response, resplsd);
- }
+ this->onSuccess(response, resplsd);
+ }
}