From f945415210f0e18c2c6d941fda6b7d45cb0f06f1 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Wed, 13 Mar 2013 06:26:25 +0000 Subject: Large changes to the LLCurl::Responder API, as well as pulling in some changes to common libraries from the server codebase: * Additional error checking in http handlers. * Uniform log spam for http errors. * Switch to using constants for http heads and status codes. * Fixed bugs in incorrectly checking if parsing LLSD xml resulted in an error. * Reduced spam regarding LLSD parsing errors in the default completedRaw http handler. It should not longer be necessary to short-circuit completedRaw to avoid spam. * Ported over a few bug fixes from the server code. * Switch mode http status codes to use S32 instead of U32. * Ported LLSD::asStringRef from server code; avoids copying strings all over the place. * Ported server change to LLSD::asBinary; this always returns a reference now instead of copying the entire binary blob. * Ported server pretty notation format (and pretty binary format) to llsd serialization. * The new LLCurl::Responder API no longer has two error handlers to choose from. Overriding the following methods have been deprecated: ** error - use httpFailure ** errorWithContent - use httpFailure ** result - use httpSuccess ** completed - use httpCompleted ** completedHeader - no longer necessary; call getResponseHeaders() from a completion method to obtain these headers. * In order to 'catch' a completed http request, override one of these methods: ** httpSuccess - Called for any 2xx status code. ** httpFailure - Called for any non-2xx status code. ** httpComplete - Called for all status codes. Default implementation is to call either httpSuccess or httpFailure. * It is recommended to keep these methods protected/private in order to avoid triggering of these methods without using a 'push' method (see below). * Uniform error handling should followed whenever possible by calling a variant of this during httpFailure: ** llwarns << dumpResponse() << llendl; * Be sure to include LOG_CLASS(your_class_name) in your class in order for the log entry to give more context. * In order to 'push' a result into the responder, you should no longer call error, errorWithContent, result, or completed. * Nor should you directly call httpSuccess/Failure/Completed (unless passing a message up to a parent class). * Instead, you can set the internal content of a responder and trigger a corresponding method using the following methods: ** successResult - Sets results and calls httpSuccess ** failureResult - Sets results and calls httpFailure ** completedResult - Sets results and calls httpCompleted * To obtain information about a the response from a reponder method, use the following getters: ** getStatus - HTTP status code ** getReason - Reason string ** getContent - Content (Parsed body LLSD) ** getResponseHeaders - Response Headers (LLSD map) ** getHTTPMethod - HTTP method of the request ** getURL - URL of the request * It is still possible to override completeRaw if you want to manipulate data directly out of LLPumpIO. * See indra/llmessage/llcurl.h for more information. --- indra/llmessage/llhttpconstants.h | 220 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 indra/llmessage/llhttpconstants.h (limited to 'indra/llmessage/llhttpconstants.h') diff --git a/indra/llmessage/llhttpconstants.h b/indra/llmessage/llhttpconstants.h new file mode 100644 index 0000000000..34263e17c8 --- /dev/null +++ b/indra/llmessage/llhttpconstants.h @@ -0,0 +1,220 @@ +/** + * @file llhttpconstants.h + * @brief Constants for HTTP requests and responses + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2013, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_HTTP_CONSTANTS_H +#define LL_HTTP_CONSTANTS_H + +#include "stdtypes.h" + +/////// HTTP STATUS CODES /////// + +// Standard errors from HTTP spec: +// http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1 +const S32 HTTP_CONTINUE = 100; +const S32 HTTP_SWITCHING_PROTOCOLS = 101; + +// Success +const S32 HTTP_OK = 200; +const S32 HTTP_CREATED = 201; +const S32 HTTP_ACCEPTED = 202; +const S32 HTTP_NON_AUTHORITATIVE_INFORMATION = 203; +const S32 HTTP_NO_CONTENT = 204; +const S32 HTTP_RESET_CONTENT = 205; +const S32 HTTP_PARTIAL_CONTENT = 206; + +// Redirection +const S32 HTTP_MULTIPLE_CHOICES = 300; +const S32 HTTP_MOVED_PERMANENTLY = 301; +const S32 HTTP_FOUND = 302; +const S32 HTTP_SEE_OTHER = 303; +const S32 HTTP_NOT_MODIFIED = 304; +const S32 HTTP_USE_PROXY = 305; +const S32 HTTP_TEMPORARY_REDIRECT = 307; + +// Client Error +const S32 HTTP_BAD_REQUEST = 400; +const S32 HTTP_UNAUTHORIZED = 401; +const S32 HTTP_PAYMENT_REQUIRED = 402; +const S32 HTTP_FORBIDDEN = 403; +const S32 HTTP_NOT_FOUND = 404; +const S32 HTTP_METHOD_NOT_ALLOWED = 405; +const S32 HTTP_NOT_ACCEPTABLE = 406; +const S32 HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; +const S32 HTTP_REQUEST_TIME_OUT = 408; +const S32 HTTP_CONFLICT = 409; +const S32 HTTP_GONE = 410; +const S32 HTTP_LENGTH_REQUIRED = 411; +const S32 HTTP_PRECONDITION_FAILED = 412; +const S32 HTTP_REQUEST_ENTITY_TOO_LARGE = 413; +const S32 HTTP_REQUEST_URI_TOO_LARGE = 414; +const S32 HTTP_UNSUPPORTED_MEDIA_TYPE = 415; +const S32 HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; +const S32 HTTP_EXPECTATION_FAILED = 417; + +// Server Error +const S32 HTTP_INTERNAL_SERVER_ERROR = 500; +const S32 HTTP_NOT_IMPLEMENTED = 501; +const S32 HTTP_BAD_GATEWAY = 502; +const S32 HTTP_SERVICE_UNAVAILABLE = 503; +const S32 HTTP_GATEWAY_TIME_OUT = 504; +const S32 HTTP_VERSION_NOT_SUPPORTED = 505; + +// We combine internal process errors with status codes +// These status codes should not be sent over the wire +// and indicate something went wrong internally. +// If you get these they are not normal. +const S32 HTTP_INTERNAL_CURL_ERROR = 498; +const S32 HTTP_INTERNAL_ERROR = 499; + + +////// HTTP Methods ////// + +extern const std::string HTTP_VERB_INVALID; +extern const std::string HTTP_VERB_HEAD; +extern const std::string HTTP_VERB_GET; +extern const std::string HTTP_VERB_PUT; +extern const std::string HTTP_VERB_POST; +extern const std::string HTTP_VERB_DELETE; +extern const std::string HTTP_VERB_MOVE; +extern const std::string HTTP_VERB_OPTIONS; + +enum EHTTPMethod +{ + HTTP_INVALID = 0, + HTTP_HEAD, + HTTP_GET, + HTTP_PUT, + HTTP_POST, + HTTP_DELETE, + HTTP_MOVE, // Caller will need to set 'Destination' header + HTTP_OPTIONS, + HTTP_METHOD_COUNT +}; + +const std::string& httpMethodAsVerb(EHTTPMethod method); +bool isHttpInformationalStatus(S32 status); +bool isHttpGoodStatus(S32 status); +bool isHttpRedirectStatus(S32 status); +bool isHttpClientErrorStatus(S32 status); +bool isHttpServerErrorStatus(S32 status); + +// Parses 'Retry-After' header contents and returns seconds until retry should occur. +bool getSecondsUntilRetryAfter(const std::string& retry_after, F32& seconds_to_wait); + +//// HTTP Headers ///// + +extern const std::string HTTP_HEADER_ACCEPT; +extern const std::string HTTP_HEADER_ACCEPT_CHARSET; +extern const std::string HTTP_HEADER_ACCEPT_ENCODING; +extern const std::string HTTP_HEADER_ACCEPT_LANGUAGE; +extern const std::string HTTP_HEADER_ACCEPT_RANGES; +extern const std::string HTTP_HEADER_AGE; +extern const std::string HTTP_HEADER_ALLOW; +extern const std::string HTTP_HEADER_AUTHORIZATION; +extern const std::string HTTP_HEADER_CACHE_CONTROL; +extern const std::string HTTP_HEADER_CONNECTION; +extern const std::string HTTP_HEADER_CONTENT_DESCRIPTION; +extern const std::string HTTP_HEADER_CONTENT_ENCODING; +extern const std::string HTTP_HEADER_CONTENT_ID; +extern const std::string HTTP_HEADER_CONTENT_LANGUAGE; +extern const std::string HTTP_HEADER_CONTENT_LENGTH; +extern const std::string HTTP_HEADER_CONTENT_LOCATION; +extern const std::string HTTP_HEADER_CONTENT_MD5; +extern const std::string HTTP_HEADER_CONTENT_RANGE; +extern const std::string HTTP_HEADER_CONTENT_TRANSFER_ENCODING; +extern const std::string HTTP_HEADER_CONTENT_TYPE; +extern const std::string HTTP_HEADER_COOKIE; +extern const std::string HTTP_HEADER_DATE; +extern const std::string HTTP_HEADER_DESTINATION; +extern const std::string HTTP_HEADER_ETAG; +extern const std::string HTTP_HEADER_EXPECT; +extern const std::string HTTP_HEADER_EXPIRES; +extern const std::string HTTP_HEADER_FROM; +extern const std::string HTTP_HEADER_HOST; +extern const std::string HTTP_HEADER_IF_MATCH; +extern const std::string HTTP_HEADER_IF_MODIFIED_SINCE; +extern const std::string HTTP_HEADER_IF_NONE_MATCH; +extern const std::string HTTP_HEADER_IF_RANGE; +extern const std::string HTTP_HEADER_IF_UNMODIFIED_SINCE; +extern const std::string HTTP_HEADER_KEEP_ALIVE; +extern const std::string HTTP_HEADER_LAST_MODIFIED; +extern const std::string HTTP_HEADER_LOCATION; +extern const std::string HTTP_HEADER_MAX_FORWARDS; +extern const std::string HTTP_HEADER_MIME_VERSION; +extern const std::string HTTP_HEADER_PRAGMA; +extern const std::string HTTP_HEADER_PROXY_AUTHENTICATE; +extern const std::string HTTP_HEADER_PROXY_AUTHORIZATION; +extern const std::string HTTP_HEADER_RANGE; +extern const std::string HTTP_HEADER_REFERER; +extern const std::string HTTP_HEADER_RETRY_AFTER; +extern const std::string HTTP_HEADER_SERVER; +extern const std::string HTTP_HEADER_SET_COOKIE; +extern const std::string HTTP_HEADER_TE; +extern const std::string HTTP_HEADER_TRAILER; +extern const std::string HTTP_HEADER_TRANSFER_ENCODING; +extern const std::string HTTP_HEADER_UPGRADE; +extern const std::string HTTP_HEADER_USER_AGENT; +extern const std::string HTTP_HEADER_VARY; +extern const std::string HTTP_HEADER_VIA; +extern const std::string HTTP_HEADER_WARNING; +extern const std::string HTTP_HEADER_WWW_AUTHENTICATE; + +// Sadly, our proxied headers do not follow http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html +// We need to deal with lowercase headers +extern const std::string HTTP_HEADER_LOWER_ACCEPT_LANGUAGE; +extern const std::string HTTP_HEADER_LOWER_CACHE_CONTROL; +extern const std::string HTTP_HEADER_LOWER_CONTENT_LENGTH; +extern const std::string HTTP_HEADER_LOWER_CONTENT_TYPE; +extern const std::string HTTP_HEADER_LOWER_HOST; +extern const std::string HTTP_HEADER_LOWER_USER_AGENT; +extern const std::string HTTP_HEADER_LOWER_X_FORWARDED_FOR; + +//// HTTP Content Types //// + +extern const std::string HTTP_CONTENT_LLSD_XML; +extern const std::string HTTP_CONTENT_OCTET_STREAM; +extern const std::string HTTP_CONTENT_XML; +extern const std::string HTTP_CONTENT_JSON; +extern const std::string HTTP_CONTENT_TEXT_HTML; +extern const std::string HTTP_CONTENT_TEXT_HTML_UTF8; +extern const std::string HTTP_CONTENT_TEXT_PLAIN_UTF8; +extern const std::string HTTP_CONTENT_TEXT_LLSD; +extern const std::string HTTP_CONTENT_TEXT_XML; +extern const std::string HTTP_CONTENT_TEXT_LSL; +extern const std::string HTTP_CONTENT_TEXT_PLAIN; +extern const std::string HTTP_CONTENT_IMAGE_X_J2C; +extern const std::string HTTP_CONTENT_IMAGE_J2C; +extern const std::string HTTP_CONTENT_IMAGE_JPEG; +extern const std::string HTTP_CONTENT_IMAGE_PNG; +extern const std::string HTTP_CONTENT_IMAGE_BMP; + +#endif -- cgit v1.2.3 From beeefb45269f45ea717f58b30a0985951ae23c20 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 4 Apr 2013 21:50:45 +0000 Subject: Renaming HTTP_HEADER_* into HTTP_IN_HEADER_* and HTTP_OUT_HEADER_* to make it more clear which header strings should be used for incoming vs outgoing situations. Using constants for commonly used llhttpnode context strings. --- indra/llmessage/llhttpconstants.h | 139 ++++++++++++++++++++------------------ 1 file changed, 74 insertions(+), 65 deletions(-) (limited to 'indra/llmessage/llhttpconstants.h') diff --git a/indra/llmessage/llhttpconstants.h b/indra/llmessage/llhttpconstants.h index 34263e17c8..8cc3459654 100644 --- a/indra/llmessage/llhttpconstants.h +++ b/indra/llmessage/llhttpconstants.h @@ -132,71 +132,76 @@ bool getSecondsUntilRetryAfter(const std::string& retry_after, F32& seconds_to_w //// HTTP Headers ///// -extern const std::string HTTP_HEADER_ACCEPT; -extern const std::string HTTP_HEADER_ACCEPT_CHARSET; -extern const std::string HTTP_HEADER_ACCEPT_ENCODING; -extern const std::string HTTP_HEADER_ACCEPT_LANGUAGE; -extern const std::string HTTP_HEADER_ACCEPT_RANGES; -extern const std::string HTTP_HEADER_AGE; -extern const std::string HTTP_HEADER_ALLOW; -extern const std::string HTTP_HEADER_AUTHORIZATION; -extern const std::string HTTP_HEADER_CACHE_CONTROL; -extern const std::string HTTP_HEADER_CONNECTION; -extern const std::string HTTP_HEADER_CONTENT_DESCRIPTION; -extern const std::string HTTP_HEADER_CONTENT_ENCODING; -extern const std::string HTTP_HEADER_CONTENT_ID; -extern const std::string HTTP_HEADER_CONTENT_LANGUAGE; -extern const std::string HTTP_HEADER_CONTENT_LENGTH; -extern const std::string HTTP_HEADER_CONTENT_LOCATION; -extern const std::string HTTP_HEADER_CONTENT_MD5; -extern const std::string HTTP_HEADER_CONTENT_RANGE; -extern const std::string HTTP_HEADER_CONTENT_TRANSFER_ENCODING; -extern const std::string HTTP_HEADER_CONTENT_TYPE; -extern const std::string HTTP_HEADER_COOKIE; -extern const std::string HTTP_HEADER_DATE; -extern const std::string HTTP_HEADER_DESTINATION; -extern const std::string HTTP_HEADER_ETAG; -extern const std::string HTTP_HEADER_EXPECT; -extern const std::string HTTP_HEADER_EXPIRES; -extern const std::string HTTP_HEADER_FROM; -extern const std::string HTTP_HEADER_HOST; -extern const std::string HTTP_HEADER_IF_MATCH; -extern const std::string HTTP_HEADER_IF_MODIFIED_SINCE; -extern const std::string HTTP_HEADER_IF_NONE_MATCH; -extern const std::string HTTP_HEADER_IF_RANGE; -extern const std::string HTTP_HEADER_IF_UNMODIFIED_SINCE; -extern const std::string HTTP_HEADER_KEEP_ALIVE; -extern const std::string HTTP_HEADER_LAST_MODIFIED; -extern const std::string HTTP_HEADER_LOCATION; -extern const std::string HTTP_HEADER_MAX_FORWARDS; -extern const std::string HTTP_HEADER_MIME_VERSION; -extern const std::string HTTP_HEADER_PRAGMA; -extern const std::string HTTP_HEADER_PROXY_AUTHENTICATE; -extern const std::string HTTP_HEADER_PROXY_AUTHORIZATION; -extern const std::string HTTP_HEADER_RANGE; -extern const std::string HTTP_HEADER_REFERER; -extern const std::string HTTP_HEADER_RETRY_AFTER; -extern const std::string HTTP_HEADER_SERVER; -extern const std::string HTTP_HEADER_SET_COOKIE; -extern const std::string HTTP_HEADER_TE; -extern const std::string HTTP_HEADER_TRAILER; -extern const std::string HTTP_HEADER_TRANSFER_ENCODING; -extern const std::string HTTP_HEADER_UPGRADE; -extern const std::string HTTP_HEADER_USER_AGENT; -extern const std::string HTTP_HEADER_VARY; -extern const std::string HTTP_HEADER_VIA; -extern const std::string HTTP_HEADER_WARNING; -extern const std::string HTTP_HEADER_WWW_AUTHENTICATE; - -// Sadly, our proxied headers do not follow http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html -// We need to deal with lowercase headers -extern const std::string HTTP_HEADER_LOWER_ACCEPT_LANGUAGE; -extern const std::string HTTP_HEADER_LOWER_CACHE_CONTROL; -extern const std::string HTTP_HEADER_LOWER_CONTENT_LENGTH; -extern const std::string HTTP_HEADER_LOWER_CONTENT_TYPE; -extern const std::string HTTP_HEADER_LOWER_HOST; -extern const std::string HTTP_HEADER_LOWER_USER_AGENT; -extern const std::string HTTP_HEADER_LOWER_X_FORWARDED_FOR; +// Outgoing headers. Do *not* use these to check incoming headers. +// For incoming headers, use the lower-case headers, below. +extern const std::string HTTP_OUT_HEADER_ACCEPT; +extern const std::string HTTP_OUT_HEADER_ACCEPT_CHARSET; +extern const std::string HTTP_OUT_HEADER_ACCEPT_ENCODING; +extern const std::string HTTP_OUT_HEADER_ACCEPT_LANGUAGE; +extern const std::string HTTP_OUT_HEADER_ACCEPT_RANGES; +extern const std::string HTTP_OUT_HEADER_AGE; +extern const std::string HTTP_OUT_HEADER_ALLOW; +extern const std::string HTTP_OUT_HEADER_AUTHORIZATION; +extern const std::string HTTP_OUT_HEADER_CACHE_CONTROL; +extern const std::string HTTP_OUT_HEADER_CONNECTION; +extern const std::string HTTP_OUT_HEADER_CONTENT_DESCRIPTION; +extern const std::string HTTP_OUT_HEADER_CONTENT_ENCODING; +extern const std::string HTTP_OUT_HEADER_CONTENT_ID; +extern const std::string HTTP_OUT_HEADER_CONTENT_LANGUAGE; +extern const std::string HTTP_OUT_HEADER_CONTENT_LENGTH; +extern const std::string HTTP_OUT_HEADER_CONTENT_LOCATION; +extern const std::string HTTP_OUT_HEADER_CONTENT_MD5; +extern const std::string HTTP_OUT_HEADER_CONTENT_RANGE; +extern const std::string HTTP_OUT_HEADER_CONTENT_TRANSFER_ENCODING; +extern const std::string HTTP_OUT_HEADER_CONTENT_TYPE; +extern const std::string HTTP_OUT_HEADER_COOKIE; +extern const std::string HTTP_OUT_HEADER_DATE; +extern const std::string HTTP_OUT_HEADER_DESTINATION; +extern const std::string HTTP_OUT_HEADER_ETAG; +extern const std::string HTTP_OUT_HEADER_EXPECT; +extern const std::string HTTP_OUT_HEADER_EXPIRES; +extern const std::string HTTP_OUT_HEADER_FROM; +extern const std::string HTTP_OUT_HEADER_HOST; +extern const std::string HTTP_OUT_HEADER_IF_MATCH; +extern const std::string HTTP_OUT_HEADER_IF_MODIFIED_SINCE; +extern const std::string HTTP_OUT_HEADER_IF_NONE_MATCH; +extern const std::string HTTP_OUT_HEADER_IF_RANGE; +extern const std::string HTTP_OUT_HEADER_IF_UNMODIFIED_SINCE; +extern const std::string HTTP_OUT_HEADER_KEEP_ALIVE; +extern const std::string HTTP_OUT_HEADER_LAST_MODIFIED; +extern const std::string HTTP_OUT_HEADER_LOCATION; +extern const std::string HTTP_OUT_HEADER_MAX_FORWARDS; +extern const std::string HTTP_OUT_HEADER_MIME_VERSION; +extern const std::string HTTP_OUT_HEADER_PRAGMA; +extern const std::string HTTP_OUT_HEADER_PROXY_AUTHENTICATE; +extern const std::string HTTP_OUT_HEADER_PROXY_AUTHORIZATION; +extern const std::string HTTP_OUT_HEADER_RANGE; +extern const std::string HTTP_OUT_HEADER_REFERER; +extern const std::string HTTP_OUT_HEADER_RETRY_AFTER; +extern const std::string HTTP_OUT_HEADER_SERVER; +extern const std::string HTTP_OUT_HEADER_SET_COOKIE; +extern const std::string HTTP_OUT_HEADER_TE; +extern const std::string HTTP_OUT_HEADER_TRAILER; +extern const std::string HTTP_OUT_HEADER_TRANSFER_ENCODING; +extern const std::string HTTP_OUT_HEADER_UPGRADE; +extern const std::string HTTP_OUT_HEADER_USER_AGENT; +extern const std::string HTTP_OUT_HEADER_VARY; +extern const std::string HTTP_OUT_HEADER_VIA; +extern const std::string HTTP_OUT_HEADER_WARNING; +extern const std::string HTTP_OUT_HEADER_WWW_AUTHENTICATE; + +// Incoming headers are normalized to lower-case. +extern const std::string HTTP_IN_HEADER_ACCEPT_LANGUAGE; +extern const std::string HTTP_IN_HEADER_CACHE_CONTROL; +extern const std::string HTTP_IN_HEADER_CONTENT_LENGTH; +extern const std::string HTTP_IN_HEADER_CONTENT_LOCATION; +extern const std::string HTTP_IN_HEADER_CONTENT_TYPE; +extern const std::string HTTP_IN_HEADER_HOST; +extern const std::string HTTP_IN_HEADER_LOCATION; +extern const std::string HTTP_IN_HEADER_RETRY_AFTER; +extern const std::string HTTP_IN_HEADER_SET_COOKIE; +extern const std::string HTTP_IN_HEADER_USER_AGENT; +extern const std::string HTTP_IN_HEADER_X_FORWARDED_FOR; //// HTTP Content Types //// @@ -217,4 +222,8 @@ extern const std::string HTTP_CONTENT_IMAGE_JPEG; extern const std::string HTTP_CONTENT_IMAGE_PNG; extern const std::string HTTP_CONTENT_IMAGE_BMP; +//// HTTP Cache Settings //// +extern const std::string HTTP_NO_CACHE; +extern const std::string HTTP_NO_CACHE_CONTROL; + #endif -- cgit v1.2.3 From 6c56c77ec575141963c5de8dfa228253fe175bc3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 24 May 2013 08:53:21 -0400 Subject: SH-4027 WIP - initial implementation of item update via AIS. --- indra/llmessage/llhttpconstants.h | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) mode change 100644 => 100755 indra/llmessage/llhttpconstants.h (limited to 'indra/llmessage/llhttpconstants.h') diff --git a/indra/llmessage/llhttpconstants.h b/indra/llmessage/llhttpconstants.h old mode 100644 new mode 100755 index 8cc3459654..aa947af414 --- a/indra/llmessage/llhttpconstants.h +++ b/indra/llmessage/llhttpconstants.h @@ -2,31 +2,25 @@ * @file llhttpconstants.h * @brief Constants for HTTP requests and responses * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2013, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2001-2013, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -117,6 +111,7 @@ enum EHTTPMethod HTTP_DELETE, HTTP_MOVE, // Caller will need to set 'Destination' header HTTP_OPTIONS, + HTTP_PATCH, HTTP_METHOD_COUNT }; -- cgit v1.2.3 From a85fa3b10a406218cabfecc0d592e816f8dfdb53 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 11 Jul 2013 15:15:04 -0700 Subject: Adding support for COPY methods to httpclient. Implementing viewer-side use of AISv3 COPY library folder operation. (SH-4304) --- indra/llmessage/llhttpconstants.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llmessage/llhttpconstants.h') diff --git a/indra/llmessage/llhttpconstants.h b/indra/llmessage/llhttpconstants.h index aa947af414..4aa3cc6394 100755 --- a/indra/llmessage/llhttpconstants.h +++ b/indra/llmessage/llhttpconstants.h @@ -112,6 +112,7 @@ enum EHTTPMethod HTTP_MOVE, // Caller will need to set 'Destination' header HTTP_OPTIONS, HTTP_PATCH, + HTTP_COPY, HTTP_METHOD_COUNT }; -- cgit v1.2.3