diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/llmessage/llhttpnode.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llmessage/llhttpnode.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/linden/indra/llmessage/llhttpnode.cpp b/linden/indra/llmessage/llhttpnode.cpp index 0d60a64..2ba900a 100644 --- a/linden/indra/llmessage/llhttpnode.cpp +++ b/linden/indra/llmessage/llhttpnode.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -35,8 +36,8 @@ | |||
35 | #include <boost/tokenizer.hpp> | 36 | #include <boost/tokenizer.hpp> |
36 | 37 | ||
37 | #include "llstl.h" | 38 | #include "llstl.h" |
39 | #include "lliohttpserver.h" // for string constants | ||
38 | 40 | ||
39 | static const std::string CONTEXT_REQUEST("request"); | ||
40 | static const std::string CONTEXT_WILDCARD("wildcard"); | 41 | static const std::string CONTEXT_WILDCARD("wildcard"); |
41 | 42 | ||
42 | /** | 43 | /** |
@@ -180,7 +181,8 @@ void LLHTTPNode::options(ResponsePtr response, const LLSD& context) const | |||
180 | //llinfos << "options context: " << context << llendl; | 181 | //llinfos << "options context: " << context << llendl; |
181 | 182 | ||
182 | // default implementation constructs an url to the documentation. | 183 | // default implementation constructs an url to the documentation. |
183 | std::string host = context[CONTEXT_REQUEST]["headers"]["host"].asString(); | 184 | std::string host( |
185 | context[CONTEXT_REQUEST][CONTEXT_HEADERS]["host"].asString()); | ||
184 | if(host.empty()) | 186 | if(host.empty()) |
185 | { | 187 | { |
186 | response->status(400, "Bad Request -- need Host header"); | 188 | response->status(400, "Bad Request -- need Host header"); |
@@ -474,6 +476,11 @@ void LLSimpleResponse::result(const LLSD& result) | |||
474 | status(200, "OK"); | 476 | status(200, "OK"); |
475 | } | 477 | } |
476 | 478 | ||
479 | void LLSimpleResponse::extendedResult(S32 code, const std::string& body, const LLSD& headers) | ||
480 | { | ||
481 | status(code,body); | ||
482 | } | ||
483 | |||
477 | void LLSimpleResponse::status(S32 code, const std::string& message) | 484 | void LLSimpleResponse::status(S32 code, const std::string& message) |
478 | { | 485 | { |
479 | mCode = code; | 486 | mCode = code; |