Commit Graph

56 Commits (31e2fa5e50bc5aad265e8ec12613223eeb3ae3e1)

Author SHA1 Message Date
Andrey Lihatskiy f9373a9b4e Merge branch 'master' into DRTVWR-527-maint
# Conflicts:
#	autobuild.xml
#	indra/newview/installers/windows/lang_pl.nsi
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llinventorymodel.cpp
2021-11-16 00:54:53 +02:00
Andrey Kleshchev 9a10719250 SL-16125 Crash in sslVerify on shutdown 2021-10-04 21:26:05 +03:00
Andrey Lihatskiy 2ded530f93 Merge branch 'master' into DRTVWR-522-maint
# Conflicts:
#	doc/contributions.txt
#	indra/newview/llappcorehttp.cpp
#	indra/newview/llappcorehttp.h
2021-07-19 22:20:45 +03:00
Mnikolenko Productengine 766a9f150c SL-2141 Disable the ability to change pipelining setting without restarting the viewer 2021-01-05 13:27:01 +02:00
Andrey Lihatskiy 83822fd199 Merge branch 'master' into DRTVWR-516-maint
# Conflicts:
#	indra/newview/llvocache.cpp
2020-09-28 22:39:06 +03:00
Andrey Kleshchev 6936736d17 Revert SL-13927 commit 8c8eac256b.
Got into D503 by accident
2020-09-11 21:00:20 +03:00
Andrey Kleshchev 8c8eac256b SL-13927 Turn SSL verification On for all SL services in viewer 2020-09-11 16:32:19 +03:00
Andrey Kleshchev 8594be3b9a SL-13927 Turn SSL verification On for all SL services in viewer 2020-09-11 16:31:15 +03:00
Andrey Kleshchev b856745048 SL-13835 SSL verification should not crash on invalid certificate 2020-08-21 20:14:35 +03:00
Oz Linden d7c8678c3a merge 5.1.0-release 2018-01-17 12:43:28 -05:00
Rider Linden 57d5744f2c MAINT-7634: Move StatsAccumulator into llcommon, collect data sent and error codes from core. 2017-07-28 14:07:25 -07:00
Oz Linden fd3628ef45 Change certificate store infrastructure to key off of the Subject Key
Id rather than sha1 hash, since that is rarely used in modern
certs. The previous form was storing trusted certs using an empty sha1
hash value as the key, which meant most certificates matched... not good.

Modify the LLCertException to pass certificate information back as
LLSD rather than an LLPointer<LLCertificate>, because when the
exception is being thown from the certificate constructor that results
in one of a couple of other exceptions (even refcounting won't save
you when the problem is that the thing you're pointing to never
finished coming into being properly).

Update the certificates in the llsechandler_basic_test to modern
conventions, and extend the classes to allow for an optional
validation date so that the test can use a fixed date. Also make all
the certificates include the plain text form for ease of reference.
2017-04-14 16:05:59 -04:00
Oz Linden 8e30a2f06d merge changes for 4.1.1-release 2016-10-18 15:38:33 -04:00
Nat Goodspeed 4d10172d8b MAINT-5011: Catch unhandled exceptions in LLCoros coroutines.
Wrap coroutine call in try/catch in top-level coroutine wrapper function
LLCoros::toplevel(). Distinguish exception classes derived from
LLContinueError (log and continue) from all others (crash with LL_ERRS).

Enhance CRASH_ON_UNHANDLED_EXCEPTIONS() and LOG_UNHANDLED_EXCEPTIONS() macros
to accept a context string to supplement the log message. This lets us replace
many places that called boost::current_exception_diagnostic_information() with
LOG_UNHANDLED_EXCEPTIONS() instead, since the explicit calls were mostly to
log supplemental information.

Provide supplemental information (coroutine name, function parameters) for
some of the previous LOG_UNHANDLED_EXCEPTIONS() calls. This information
duplicates LL_DEBUGS() information at the top of these functions, but in a
typical log file we wouldn't see the LL_DEBUGS() message.

Eliminate a few catch (std::exception e) clauses: the information we get from
boost::current_exception_diagnostic_information() in a catch (...) clause
makes it unnecessary to distinguish.

In a few cases, add a final 'throw;' to a catch (...) clause: having logged
the local context info, propagate the exception to be caught by higher-level
try/catch.

In a couple places, couldn't resist reconciling indentation within a
particular function: tabs where the rest of the function uses tabs, spaces
where the rest of the function uses spaces.

In LLLogin::Impl::loginCoro(), eliminate some confusing comments about an
array of rewritten URIs that date back to a long-deleted implementation.
2016-08-18 17:33:44 -04:00
Nat Goodspeed 993f54f6e9 MAINT-5011: Try to enrich catch (...) logging throughout viewer.
Turns out we have a surprising number of catch (...) clauses in the viewer
code base. If all we currently do is

    LL_ERRS() << "unknown exception" << LL_ENDL;

then call CRASH_ON_UNHANDLED_EXCEPTION() instead. If what we do is

    LL_WARNS() << "unknown exception" << LL_ENDL;

then call LOG_UNHANDLED_EXCEPTION() instead.

Since many places need LOG_UNHANDLED_EXCEPTION() and nobody catches
LLContinueError yet, eliminate LLContinueError& parameter from
LOG_UNHANDLED_EXCEPTION(). This permits us to use the same log message as
CRASH_ON_UNHANDLED_EXCEPTION(), just with a different severity level.

Where a catch (...) clause actually provides contextual information, or makes
an error string, add boost::current_exception_diagnostic_information() to try
to figure out actual exception class and message.
2016-08-17 15:40:03 -04:00
Oz Linden 2be32eedb5 fail in initialization if there is no CA bundle (instead of waiting for an opaque connection failure) 2016-07-28 13:21:04 -04:00
Nat Goodspeed 47d93e4f65 DRTVWR-418: Remove rogue getMessage() from llsecapi.h exceptions.
The LLProtectedDataException and LLCertException exception classes didn't used
to be derived from std::exception, so they followed their own getMessage()
convention instead of the standard what() convention. Now that they're derived
from std::exception, remove getMessage() and change its few consumers to use
what() instead. Thanks NickyD for suggesting.
2016-07-19 14:08:43 -04:00
Oz Linden 950c41d184 merge 4.0.4-release and MAINT-5974 2016-05-06 10:28:42 -04:00
Rider Linden 4d9dd3271b MAINT-6338: Add methods for getting and setting boolean properties from gSavedSettings in the HTTPCore. Use those methods to access new key HTTPLogBodyOnError. Dump body of HTTP message to log in case of error if this key is true. 2016-04-25 12:06:33 -07:00
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Rider Linden bfabb7bd2b MAINT-6137: Re enable pipelining by default, use new version of CURL (7.47) with corrections for timed out connections in pipelining. Minor fix for safer op retrieval. 2016-02-19 11:19:50 -08:00
Rider Linden 70d4c0ad7d MAINT-6067: There appears to be an issue with HTTP pipelining and timeouts in CURL that has never been resolved (see https://github.com/bagder/curl/issues/627). Until resolved disable pipelining for meshes and textures. 2016-02-02 12:11:08 -08:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Rider Linden 302e578069 This file change should not have been checked in. 2015-10-15 11:50:30 -07:00
Rider Linden 6ff0bff8f0 Another fix for unit tests. Missed on Windows. 2015-10-15 11:42:43 -07:00
Rider Linden 3fdd5abf96 MAINT-5732: Issue in texture_load example and some comments regarding NoOpDeletor 2015-10-15 10:12:58 -07:00
rider eca891e261 MAINT-5732: Fixes for Mac build 2015-10-15 09:32:19 -07:00
Rider Linden bbb9d4f21b MAINT-5732: Change to the way event polling handles error conditions and cancel calls.
Refactor any remaining LLCore::HTTPHandlers to use boost::shared_ptr
Started minor refactor in the materials manager into coroutines (unfinished)
2015-10-14 17:46:24 -07:00
Rider Linden 907efc9cc9 MAINT-5507: Remove llcurl, move constant values and untilities to llcorehttp lib 2015-09-15 17:01:26 -07:00
Rider Linden 7353640387 first set of chnages from code review from Nat 2015-03-27 17:00:02 -07:00
Rider Linden 97b9317969 Create trivial handler for SD Messages, method in LLAgent for posting HTTP requests. 2015-03-26 13:32:09 -07:00
Rider Linden e140118fc4 Replace appearance responder with new LLCore Appearance Handler.
Prep for some slight cleanup of the code.
Add AP_AVATAR Policy
2015-03-25 11:31:11 -07:00
Rider Linden 9d676ce5b9 Clean up and use policies for Material transfer. 2015-03-20 13:16:25 -07:00
Rider Linden 6f4d36634e Removal of RPCXML dep on LLCurl switching to LLCore::Html 2015-03-16 17:14:34 -07:00
Monty Brandenberg ee4cd59462 Merge. Refresh from viewer-drano-http-4 after pipelining work. 2014-09-05 17:37:21 -04:00
Monty Brandenberg 85cba58ad4 Add an HTTP policy class for inventory operations using four (4)
connections.  Convert background and foreground fetches, both
items and folders/inventory and library, to use new HTTP.
Non-fetch inventory operations continue to use LLHTTPClient
(at least for now).  Error handling and retry on fetches wasn't
100% previously and that's still the case.  I'll rip through
this again to clean that up.  Cleaned up logging in much of
the inventory code with consistent labels on logging events
and correct macros (removed deprecation warnings).

This started as an attempt to get libcurl to do pipelining
on POSTs and PUTs.  Discovered that this is going to be
very difficult to support in general in libcurl.  May
look at that again in the future.
2014-08-22 18:04:27 -04:00
Monty Brandenberg 7fa3829376 Remove viewer-side throttles on mesh requests. 2014-08-21 15:20:31 -04:00
Monty Brandenberg e79a88c8cc Better support for dynamic option changes in llcorehttp. Libcurl has
some problems disabling pipelining on a multi handle with outstanding
requests so build a more conservative system that allows requests
to drain before setting curl multi options.  Would rather not have
this but it is significantly safer.  "HttpPipelining" debug setting
is now fully dynamic.  Connection limits can also be made dynamic
in the near future.  Upped the default connection count back to 8 for
now but will revisit this in the tuning phase.  It might be time to
combine mesh and textures into a single asset class.  For normal
server operations that would be a clear path, but for server under
load, the current scheme may be better.  Minor cleanup in logging
to elminate some redundant strings.  Might add some more tracing to the
stall logic 'just in case'.
2014-08-12 18:21:26 -04:00
Monty Brandenberg 17da4cf57a Cleanup and tuning. Use a consistent index on some initialization
data so their isn't an opportunity for gaps over overruns (init_data).
Start some preliminary tweaking of policy class numbers.  It looks
like I can easily drop the default connection count to '4' and
still hit the throttles.  Did some experiments running pipeline
deeper which was mostly fine for textures but tended to slow
meshes.  Reason uncertain but a depth of '5' seems generally healthy
for mesh.  I had one run of 52.6S with a theoretical minimum of 51.2S.
That's as good as I've ever seen.
2014-06-27 17:25:39 -04:00
Monty Brandenberg 5cca78e718 First HTTP pipelining viewer. Enable pipelining for
GetTexture and GetMesh2 at a pipeline depth of 5.  Create
global debug option, HttpPipelining, to enable and disable
HTTP pipelining (defaults to true).  Tweak texture and
mesh low- and high-water request levels based on pipelining
status and depth.  Fixup texture console which was damaged
in a recent release.  Split logging of the no-request
HTTP error case into two cases:  one for missing URL in
HTTP request, one for HTTP request not created.  A refactor
in llcorehttp is coming:  I will be moving all libcurl-
using code into libcurl-specific modules.
2014-06-23 14:23:33 -04:00
Monty Brandenberg 195d319f65 SH-4492 Create a useful README for llcorehttp
Last bit for this release.  Describe stream adapters and how
to select a policy class.  Slight changes to setup code to
make reality reflect documentation.
2013-09-18 18:44:41 -04:00
Monty Brandenberg 549e20cf77 Change the setting for GetMesh2 meshes to Mesh2MaxConcurrentRequests.
While linking GetMesh2 to the old setting was simpler from a user
point-of-view, they really shouldn't be linked and the old one will
go away.  This one may be renamed to AssetMaxConcurrentRequests or
something similar if we get to the mesh/texture unification step.
2013-08-05 13:54:14 -04:00
Monty Brandenberg f3927c6ca2 SH-4371 Reduce 22mS inter-connection latency.
This really extended into the client-side request throttling.
Moved this from llmeshrepository (which doesn't really want
to do connection management) into llcorehttp.  It's now a
class option with configurable rate.  This still isn't the
right thing to do as it creates coupling between viewer
and services.  When we get to pipelining, this notion becomes
invalid.
2013-07-30 15:21:31 -04:00
Monty Brandenberg eff651cffc SH-4312 Configuration data between viewer and llcorehttp is clumsy.
Much improved.  Unified the global and class options into a single
option list.  Implemented static and dynamic setting paths as much
as possible.  Dynamic path does require packet/RPC but otherwise
there's near unification.  Dynamic modes can't get values back yet
due to the response/notifier scheme but this doesn't bother me.
Flatten global and class options into simpler struct-like entities.
Setter/getter available on these when needed (external APIs) but code
can otherwise fiddle directly when it knows what to do.  Much duplicated
options/state removed from HttpPolicy.  Comments cleaned up.  Threads
better described and consistently mentioned in API docs.  Integration
test extended for 503 responses with Reply-After headers.
2013-07-12 15:00:24 -04:00
Monty Brandenberg f42d17f6c1 Orphaned declaration preventing compilation. 2013-06-29 03:08:32 +00:00
Monty Brandenberg a12d5d7c6d SH-4312 Clumsy configuration coordination between mesh and corehttp
Taught llappcorehttp to register signals on the settings values
that chagne behavior.  Have initialization and settings changes
sweep through settings and change them.  Dynamic changes are tried
but have no effect (produce a warning message) as dynamic settings
still aren't supported but the plumbing is now connected.  Just
need to change llcorehttp.  Bounced the 'teleport started' signal
around and it ended up back where it started with some cleanup.
This is making me less angry...
2013-06-28 20:08:29 -04:00
Monty Brandenberg d6cbcd591a SH-4257 Preparation for a new cap grant: GetMesh2
Mesh repo is using three policy classes now:  one for
large objects, one for GetMesh2 regions, one for
GetMesh regions.  It's also detecting the presence
of the cap and using the correct class.  Class
initialization cleaned up significantly in llappcorehttp
using data-directed code.  Pulled in the changes to
HttpHeader done for sunshine-internal then did a
refactoring pass on the header callback which now
uses a unified approach to clean up and deliver
header information to all interested parties.  Added
support for using Retry-After header information on
503 retries.
2013-06-20 19:18:39 -04:00
Monty Brandenberg 626752beab SH-4252 Add second policy class for large mesh asset downloads
Added second mesh class as well as an asset upload class.
Refactored initialization to use less code and more data to
cleanly get http started.  Modified mesh to use the new
http class for large requests (>2MB for now).  Added additional
timeout setting to llcorehttp to distinguish connection timeout
from transport timeout and are now using transport timeout
values for large asset downloads that may need more time.
2013-06-19 13:55:54 -04:00
Monty Brandenberg bad06f68fc Merge. Refresh from viewer-release merged with in-progress work. 2013-06-03 13:59:11 -04:00
Monty Brandenberg af8c2bc948 Merge. Pull viewer-release to get the new version scheme changes. 2013-05-30 23:51:33 +00:00