diff options
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llhttpclient.cpp | 11 | ||||
-rw-r--r-- | indra/llmessage/llpumpio.cpp | 7 | ||||
-rw-r--r-- | indra/llmessage/llurlrequest.cpp | 5 | ||||
-rw-r--r-- | indra/llmessage/llurlrequest.h | 5 | ||||
-rw-r--r-- | indra/llmessage/tests/llhost_test.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/tests/llmime_test.cpp | 4 | ||||
-rw-r--r-- | indra/llmessage/tests/llnamevalue_test.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/tests/llpartdata_test.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/tests/llregionpresenceverifier_test.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/tests/lltrustedmessageservice_test.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/tests/llxfer_file_test.cpp | 2 |
12 files changed, 32 insertions, 14 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 47b86bd53d..0e5206a520 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -234,9 +234,14 @@ static void request( lldebugs << LLURLRequest::actionAsVerb(method) << " " << url << " " << headers << llendl; - // Insert custom headers is the caller sent any - if (headers.isMap()) - { + // Insert custom headers if the caller sent any + if (headers.isMap()) + { + if (headers.has("Cookie")) + { + req->allowCookies(); + } + LLSD::map_const_iterator iter = headers.beginMap(); LLSD::map_const_iterator end = headers.endMap(); diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index 393e6e9813..a8d2a0a224 100644 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -438,13 +438,13 @@ void LLPumpIO::pump() pump(DEFAULT_POLL_TIMEOUT); } -static LLFastTimer::DeclareTimer FTM_PUMP("Pump"); +static LLFastTimer::DeclareTimer FTM_PUMP_IO("Pump IO"); //timeout is in microseconds void LLPumpIO::pump(const S32& poll_timeout) { LLMemType m1(LLMemType::MTYPE_IO_PUMP); - LLFastTimer t1(FTM_PUMP); + LLFastTimer t1(FTM_PUMP_IO); //llinfos << "LLPumpIO::pump()" << llendl; // Run any pending runners. @@ -772,6 +772,8 @@ bool LLPumpIO::respond( return true; } +static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain"); + void LLPumpIO::callback() { LLMemType m1(LLMemType::MTYPE_IO_PUMP); @@ -793,6 +795,7 @@ void LLPumpIO::callback() callbacks_t::iterator end = mCallbacks.end(); for(; it != end; ++it) { + LLFastTimer t(FTM_PUMP_CALLBACK_CHAIN); // it's always the first and last time for respone chains (*it).mHead = (*it).mChainLinks.begin(); (*it).mInit = true; diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 8adb3cda19..cb9d1c3731 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -245,6 +245,11 @@ void LLURLRequest::useProxy(const std::string &proxy) mDetail->mCurlRequest->setoptString(CURLOPT_PROXY, proxy); } +void LLURLRequest::allowCookies() +{ + mDetail->mCurlRequest->setoptString(CURLOPT_COOKIEFILE, ""); +} + // virtual LLIOPipe::EStatus LLURLRequest::handleError( LLIOPipe::EStatus status, diff --git a/indra/llmessage/llurlrequest.h b/indra/llmessage/llurlrequest.h index dad245f154..ec5c2c1941 100644 --- a/indra/llmessage/llurlrequest.h +++ b/indra/llmessage/llurlrequest.h @@ -183,6 +183,11 @@ public: */ void useProxy(const std::string& proxy); + /** + * @brief Turn on cookie handling for this request with CURLOPT_COOKIEFILE. + */ + void allowCookies(); + public: /** * @brief Give this pipe a chance to handle a generated error diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp index 36f819ad33..b20bceae1d 100644 --- a/indra/llmessage/tests/llhost_test.cpp +++ b/indra/llmessage/tests/llhost_test.cpp @@ -39,7 +39,7 @@ namespace tut }; typedef test_group<host_data> host_test; typedef host_test::object host_object; - tut::host_test host_testcase("llhost"); + tut::host_test host_testcase("LLHost"); template<> template<> diff --git a/indra/llmessage/tests/llmime_test.cpp b/indra/llmessage/tests/llmime_test.cpp index 0616c070c4..aed5c4589c 100644 --- a/indra/llmessage/tests/llmime_test.cpp +++ b/indra/llmessage/tests/llmime_test.cpp @@ -41,7 +41,7 @@ namespace tut }; typedef test_group<mime_index> mime_index_t; typedef mime_index_t::object mime_index_object_t; - tut::mime_index_t tut_mime_index("mime_index"); + tut::mime_index_t tut_mime_index("LLMime"); template<> template<> void mime_index_object_t::test<1>() @@ -228,7 +228,7 @@ namespace tut }; typedef test_group<mime_parse> mime_parse_t; typedef mime_parse_t::object mime_parse_object_t; - tut::mime_parse_t tut_mime_parse("mime_parse"); + tut::mime_parse_t tut_mime_parse("LLMimeParse"); template<> template<> void mime_parse_object_t::test<1>() diff --git a/indra/llmessage/tests/llnamevalue_test.cpp b/indra/llmessage/tests/llnamevalue_test.cpp index da22ec80ef..8902fdd2e8 100644 --- a/indra/llmessage/tests/llnamevalue_test.cpp +++ b/indra/llmessage/tests/llnamevalue_test.cpp @@ -49,7 +49,7 @@ namespace tut }; typedef test_group<namevalue_test> namevalue_t; typedef namevalue_t::object namevalue_object_t; - tut::namevalue_t tut_namevalue("namevalue_test"); + tut::namevalue_t tut_namevalue("LLNameValue"); template<> template<> diff --git a/indra/llmessage/tests/llpartdata_test.cpp b/indra/llmessage/tests/llpartdata_test.cpp index b26e7a5849..9123bd06c7 100644 --- a/indra/llmessage/tests/llpartdata_test.cpp +++ b/indra/llmessage/tests/llpartdata_test.cpp @@ -44,7 +44,7 @@ namespace tut }; typedef test_group<partdata_test> partdata_test_t; typedef partdata_test_t::object partdata_test_object_t; - tut::partdata_test_t tut_partdata_test("partdata_test"); + tut::partdata_test_t tut_partdata_test("LLPartData"); template<> template<> void partdata_test_object_t::test<1>() diff --git a/indra/llmessage/tests/llregionpresenceverifier_test.cpp b/indra/llmessage/tests/llregionpresenceverifier_test.cpp index 06152b4c6d..5b89f2a8c6 100644 --- a/indra/llmessage/tests/llregionpresenceverifier_test.cpp +++ b/indra/llmessage/tests/llregionpresenceverifier_test.cpp @@ -79,7 +79,7 @@ namespace tut namespace { - tut::factory tf("LLRegionPresenceVerifier test"); + tut::factory tf("LLRegionPresenceVerifier"); } namespace tut diff --git a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp index 65fd9da690..3b04530c1a 100644 --- a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp +++ b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp @@ -98,7 +98,7 @@ namespace tut namespace { - tut::factory tf("LLTemplateMessageDispatcher test"); + tut::factory tf("LLTemplateMessageDispatcher"); } namespace tut diff --git a/indra/llmessage/tests/lltrustedmessageservice_test.cpp b/indra/llmessage/tests/lltrustedmessageservice_test.cpp index 8fc5934c61..b287a29841 100644 --- a/indra/llmessage/tests/lltrustedmessageservice_test.cpp +++ b/indra/llmessage/tests/lltrustedmessageservice_test.cpp @@ -98,7 +98,7 @@ namespace tut namespace { - tut::factory tf("LLTrustedMessageServiceData test"); + tut::factory tf("LLTrustedMessageServiceData"); } namespace tut diff --git a/indra/llmessage/tests/llxfer_file_test.cpp b/indra/llmessage/tests/llxfer_file_test.cpp index 081f898417..a8c1adf9b4 100644 --- a/indra/llmessage/tests/llxfer_file_test.cpp +++ b/indra/llmessage/tests/llxfer_file_test.cpp @@ -38,7 +38,7 @@ namespace tut }; typedef test_group<llxfer_data> llxfer_test; typedef llxfer_test::object llxfer_object; - tut::llxfer_test llxfer("llxfer"); + tut::llxfer_test llxfer("LLXferFile"); template<> template<> void llxfer_object::test<1>() |