diff options
author | Nyx Linden <nyx@lindenlab.com> | 2013-04-08 17:03:24 -0400 |
---|---|---|
committer | Nyx Linden <nyx@lindenlab.com> | 2013-04-08 17:03:24 -0400 |
commit | b4c60f430332674e5dbdb672152e62d252e9a6e1 (patch) | |
tree | c9fb6805638fc95ea0ca2c3ef28a41e915ad7f18 /indra/llmessage/llhttpnode.cpp | |
parent | 3e53ade13e7c9e70ba67a1e845696712081f7651 (diff) | |
parent | beeefb45269f45ea717f58b30a0985951ae23c20 (diff) |
merge. pulled in sunshine-stable.
Diffstat (limited to 'indra/llmessage/llhttpnode.cpp')
-rw-r--r-- | indra/llmessage/llhttpnode.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llmessage/llhttpnode.cpp b/indra/llmessage/llhttpnode.cpp index e3b42b1b16..5058fdaf51 100644 --- a/indra/llmessage/llhttpnode.cpp +++ b/indra/llmessage/llhttpnode.cpp @@ -31,9 +31,14 @@ #include "llstl.h" #include "llhttpconstants.h" -#include "lliohttpserver.h" // for string constants -static const std::string CONTEXT_WILDCARD("wildcard"); +const std::string CONTEXT_HEADERS("headers"); +const std::string CONTEXT_PATH("path"); +const std::string CONTEXT_QUERY_STRING("query-string"); +const std::string CONTEXT_REQUEST("request"); +const std::string CONTEXT_RESPONSE("response"); +const std::string CONTEXT_VERB("verb"); +const std::string CONTEXT_WILDCARD("wildcard"); /** * LLHTTPNode @@ -179,7 +184,7 @@ void LLHTTPNode::options(ResponsePtr response, const LLSD& context) const // default implementation constructs an url to the documentation. // *TODO: Check for 'Host' header instead of 'host' header? std::string host( - context[CONTEXT_REQUEST][CONTEXT_HEADERS][HTTP_HEADER_LOWER_HOST].asString()); + context[CONTEXT_REQUEST][CONTEXT_HEADERS][HTTP_IN_HEADER_HOST].asString()); if(host.empty()) { response->status(HTTP_BAD_REQUEST, "Bad Request -- need Host header"); @@ -187,7 +192,7 @@ void LLHTTPNode::options(ResponsePtr response, const LLSD& context) const } std::ostringstream ostr; ostr << "http://" << host << "/web/server/api"; - ostr << context[CONTEXT_REQUEST]["path"].asString(); + ostr << context[CONTEXT_REQUEST][CONTEXT_PATH].asString(); static const std::string DOC_HEADER("X-Documentation-URL"); response->addHeader(DOC_HEADER, ostr.str()); response->status(HTTP_OK, "OK"); |