diff --git a/indra/cmake/FindJsonCpp.cmake b/indra/cmake/FindJsonCpp.cmake
index 44ab0e769..a48c97396 100644
--- a/indra/cmake/FindJsonCpp.cmake
+++ b/indra/cmake/FindJsonCpp.cmake
@@ -3,16 +3,18 @@
# - Find JSONCpp
# Find the JSONCpp includes and library
# This module defines
-# JSONCPP_INCLUDE_DIR, where to find json.h, etc.
-# JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
-# JSONCPP_FOUND, If false, do not try to use jsoncpp.
-# also defined, but not for general use are
-# JSONCPP_LIBRARY, where to find the jsoncpp library.
+# JSONCPP_FOUND, System has libjsoncpp.
+# JSONCPP_INCLUDE_DIRS - The libjsoncpp include directories.
+# JSONCPP_LIBRARIES - The libraries needed to use libjsoncpp.
+# JSONCPP_DEFINITIONS - Compiler switches required for using libjsoncpp.
-FIND_PATH(JSONCPP_INCLUDE_DIR json/json.h
-/usr/local/include
-/usr/include
-)
+FIND_PACKAGE(PkgConfig)
+PKG_CHECK_MODULES(PC_JSONCPP jsoncpp)
+SET(JSONCPP_DEFINITIONS ${PC_JSONCPP_CFLAGS_OTHER})
+
+FIND_PATH(JSONCPP_INCLUDE_DIR json/reader.h
+ HINTS ${PC_JSONCPP_INCLUDE_DIR} ${PC_JSONCPP_INCLUDE_DIRS}
+ PATH_SUFFIXES jsoncpp)
# Get the GCC compiler version
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
@@ -22,39 +24,16 @@ EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
)
# Try to find a library that was compiled with the same compiler version as we currently use.
-SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
-IF (STANDALONE)
- # On standalone, assume that the system installed library was compiled with the used compiler.
- SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
-ENDIF (STANDALONE)
FIND_LIBRARY(JSONCPP_LIBRARY
- NAMES ${JSONCPP_NAMES}
- PATHS /usr/lib /usr/local/lib
- )
+ NAMES libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so libjsoncpp.so
+ HINTS ${PC_JSONCPP_LIBDIR} ${PC_JSONCPP_LIBRARY_DIRS}
+ PATHS /usr/lib /usr/local/lib)
-IF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
- SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
- SET(JSONCPP_FOUND "YES")
-ELSE (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
- SET(JSONCPP_FOUND "NO")
-ENDIF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
+SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
+SET(JSONCPP_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIR})
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(JSONCPP DEFAULT_MSG
+ JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
-IF (JSONCPP_FOUND)
- IF (NOT JSONCPP_FIND_QUIETLY)
- MESSAGE(STATUS "Found JSONCpp: ${JSONCPP_LIBRARIES}")
- ENDIF (NOT JSONCPP_FIND_QUIETLY)
-ELSE (JSONCPP_FOUND)
- IF (JSONCPP_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find JSONCpp library")
- ENDIF (JSONCPP_FIND_REQUIRED)
-ENDIF (JSONCPP_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_JSONCPP_LIB_PATH ${JSONCPP_LIBRARY} PATH)
-
-MARK_AS_ADVANCED(
- JSONCPP_LIBRARY
- JSONCPP_INCLUDE_DIR
- )
+MARK_AS_ADVANCED(JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake
index 241db3570..2d7c16939 100644
--- a/indra/cmake/JsonCpp.cmake
+++ b/indra/cmake/JsonCpp.cmake
@@ -2,7 +2,7 @@
include(Prebuilt)
-set(JSONCPP_FIND_QUIETLY ON)
+set(JSONCPP_FIND_QUIETLY OFF)
set(JSONCPP_FIND_REQUIRED ON)
if (STANDALONE)
diff --git a/indra/llmessage/aicurl.cpp b/indra/llmessage/aicurl.cpp
index 9f1b0d30b..754083286 100644
--- a/indra/llmessage/aicurl.cpp
+++ b/indra/llmessage/aicurl.cpp
@@ -1347,11 +1347,22 @@ void BufferedCurlEasyRequest::prepRequest(AICurlEasyRequest_wat& curl_easy_reque
curl_easy_request_w->setReadCallback(&curlReadCallback, lockobj);
curl_easy_request_w->setHeaderCallback(&curlHeaderCallback, lockobj);
+ bool allow_cookies = headers.hasHeader("Cookie");
// Allow up to ten redirects.
if (responder->followRedir())
{
curl_easy_request_w->setopt(CURLOPT_FOLLOWLOCATION, 1);
curl_easy_request_w->setopt(CURLOPT_MAXREDIRS, HTTP_REDIRECTS_DEFAULT);
+ // This is needed (at least) for authentication after temporary redirection
+ // to id.secondlife.com for marketplace.secondlife.com.
+ allow_cookies = true;
+ }
+ if (allow_cookies)
+ {
+ // Given an empty or non-existing file or by passing the empty string (""),
+ // this option will enable cookies for this curl handle, making it understand
+ // and parse received cookies and then use matching cookies in future requests.
+ curl_easy_request_w->setopt(CURLOPT_COOKIEFILE, "");
}
// Keep responder alive.
diff --git a/indra/llmessage/aicurlthread.cpp b/indra/llmessage/aicurlthread.cpp
index f39f38678..b8c700997 100644
--- a/indra/llmessage/aicurlthread.cpp
+++ b/indra/llmessage/aicurlthread.cpp
@@ -2172,6 +2172,12 @@ void BufferedCurlEasyRequest::setStatusAndReason(U32 status, std::string const&
mStatus = status;
mReason = reason;
AICurlInterface::Stats::status_count[AICurlInterface::Stats::status2index(mStatus)]++;
+
+ // Sanity check. If the server replies with a redirect status then we better have that option turned on!
+ if ((status >= 300 && status < 400) && mResponder && !mResponder->followRedir())
+ {
+ llerrs << "Received " << status << " (" << reason << ") for responder \"" << mTimeoutPolicy->name() << "\" which has no followRedir()!" << llendl;
+ }
}
void BufferedCurlEasyRequest::processOutput(void)
diff --git a/indra/llmessage/aihttptimeoutpolicy.cpp b/indra/llmessage/aihttptimeoutpolicy.cpp
index 5f7cbaf89..8677a0ac2 100644
--- a/indra/llmessage/aihttptimeoutpolicy.cpp
+++ b/indra/llmessage/aihttptimeoutpolicy.cpp
@@ -890,6 +890,7 @@ P(viewerStatsResponder);
P(viewerVoiceAccountProvisionResponder);
P(voiceCallCapResponder);
P(voiceClientCapResponder);
+P(webProfileResponders);
P(wholeModelFeeResponder);
P(wholeModelUploadResponder);
P2(XMLRPCResponder, connect_40s);
diff --git a/indra/llmessage/llhttpclient.h b/indra/llmessage/llhttpclient.h
index 3e491de82..ec4e88955 100644
--- a/indra/llmessage/llhttpclient.h
+++ b/indra/llmessage/llhttpclient.h
@@ -161,7 +161,7 @@ public:
// A derived class should return true if curl should follow redirections.
// The default is not to follow redirections.
- virtual bool followRedir(void) { return false; }
+ virtual bool followRedir(void) const { return false; }
// Timeout policy to use.
virtual AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const = 0;
@@ -188,6 +188,7 @@ public:
class ResponderHeadersOnly : public ResponderBase {
private:
/*virtual*/ bool needsHeaders(void) const { return true; }
+ /*virtual*/ bool followRedir(void) const { return true; }
protected:
// ResponderBase event
diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp
index 927b64b7a..3ffb9e5cc 100644
--- a/indra/llmessage/llurlrequest.cpp
+++ b/indra/llmessage/llurlrequest.cpp
@@ -85,11 +85,6 @@ LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action, std::string cons
void LLURLRequest::initialize_impl(void)
{
- if (mHeaders.hasHeader("Cookie"))
- {
- allowCookies();
- }
-
// If the header is "Pragma" with no value, the caller intends to
// force libcurl to drop the Pragma header it so gratuitously inserts.
// Before inserting the header, force libcurl to not use the proxy.
@@ -105,7 +100,7 @@ void LLURLRequest::initialize_impl(void)
// but if they did not specify a Content-Type, then ask the injector.
mHeaders.addHeader("Content-Type", mBody->contentType(), AIHTTPHeaders::keep_existing_header);
}
- else
+ else if (mAction != HTTP_HEAD)
{
// Check to see if we have already set Accept or not. If no one
// set it, set it to application/llsd+xml since that's what we
@@ -199,12 +194,6 @@ void LLURLRequest::useProxy(const std::string &proxy)
}
#endif
-void LLURLRequest::allowCookies()
-{
- AICurlEasyRequest_wat curlEasyRequest_w(*mCurlEasyRequest);
- curlEasyRequest_w->setoptString(CURLOPT_COOKIEFILE, "");
-}
-
bool LLURLRequest::configure(AICurlEasyRequest_wat const& curlEasyRequest_w)
{
bool rv = false;
@@ -213,13 +202,11 @@ bool LLURLRequest::configure(AICurlEasyRequest_wat const& curlEasyRequest_w)
{
case HTTP_HEAD:
curlEasyRequest_w->setopt(CURLOPT_NOBODY, 1);
- curlEasyRequest_w->setopt(CURLOPT_FOLLOWLOCATION, 1);
rv = true;
break;
case HTTP_GET:
curlEasyRequest_w->setopt(CURLOPT_HTTPGET, 1);
- curlEasyRequest_w->setopt(CURLOPT_FOLLOWLOCATION, 1);
// Set Accept-Encoding to allow response compression
curlEasyRequest_w->setoptString(CURLOPT_ENCODING, mNoCompression ? "identity" : "");
diff --git a/indra/llmessage/llurlrequest.h b/indra/llmessage/llurlrequest.h
index 8f019310f..fbe97c22f 100644
--- a/indra/llmessage/llurlrequest.h
+++ b/indra/llmessage/llurlrequest.h
@@ -84,11 +84,6 @@ class LLURLRequest : public AICurlEasyRequestStateMachine {
/*virtual*/ ~LLURLRequest() { }
public:
- /**
- * @brief Turn on cookie handling for this request with CURLOPT_COOKIEFILE.
- */
- void allowCookies(void);
-
/**
* @ brief Turn off (or on) the CURLOPT_PROXY header.
*/
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 7d565fb99..6f049c585 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -17,7 +17,7 @@ endif(FMOD)
include(OPENAL)
include(FindOpenGL)
include(Hunspell)
-#include(JsonCpp)
+include(JsonCpp)
include(LLAddBuildTest)
include(LLAudio)
include(LLCharacter)
@@ -370,6 +370,7 @@ set(viewer_SOURCE_FILES
llpanelpermissions.cpp
llpanelpick.cpp
llpanelplace.cpp
+ llpanelprofile.cpp
llpanelskins.cpp
llpanelvolume.cpp
llpanelweb.cpp
@@ -538,6 +539,7 @@ set(viewer_SOURCE_FILES
llwearablelist.cpp
llwearabletype.cpp
llweb.cpp
+ llwebprofile.cpp
llwind.cpp
llwlanimator.cpp
llwldaycycle.cpp
@@ -875,6 +877,7 @@ set(viewer_HEADER_FILES
llpanelpermissions.h
llpanelpick.h
llpanelplace.h
+ llpanelprofile.h
llpanelskins.h
llpanelvolume.h
llpanelweb.h
@@ -1048,6 +1051,7 @@ set(viewer_HEADER_FILES
llwearablelist.h
llwearabletype.h
llweb.h
+ llwebprofile.h
llwind.h
llwindebug.h
llwlanimator.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ba53a42a1..08dfa9a00 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7402,7 +7402,7 @@ Found in Advanced->Rendering->Info Displays
WebProfileURL
+ WebProfileNonProductionURL
+
HighResSnapshot