Commit Graph

30 Commits (d7c8678c3aa46aed09dce6c1edfc196e72d4b428)

Author SHA1 Message Date
Rider Linden 1038633526 MAINT-7634: Logging and instrumentation canges to narrow down viewer crashes. 2017-08-08 09:04:32 -07: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 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
rider 7c56430258 MAINT-5271: Microsoft is just too permissive. 2015-10-16 12:15:33 -07:00
Rider Linden 8d334ca1bf MAINT-5271: Converted internal pointers to internal operation to managed shared pointers. Removed direct cast and dereference of handles. 2015-10-16 11:40:48 -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 248d61fe0e MAINT-5500: Finish converting the AIS responders to the new coroutine model, Cleaned up dead an unused code.
MAINT-4952: Added COPY and MOVE methods to Core:Http adapter
2015-08-12 16:32:49 -07:00
Rider Linden 75b12d79e1 Enforcing constness of refs 2015-07-08 14:49:08 -07:00
Rider Linden fe5567639d Change HttpOptions::ptr_t to be shared_ptr<> rather than intrusive. 2015-07-08 12:09:36 -07:00
Rider Linden 1138c57f9a Convert LLCore::HttpHeaders to use shared_ptr<> rather than an intrusive_ptr<> for refrence counting. 2015-07-08 10:01:27 -07:00
Rider Linden d0c85b6dd9 Adding support for DELETE, PATCH and COPY 2015-04-10 17:23:58 -07:00
Rider Linden 7353640387 first set of chnages from code review from Nat 2015-03-27 17:00:02 -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 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
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Monty Brandenberg bc72acbfd2 SH-3244 Syscall avoidance in HttpRequest::update() method
Well, achieved that by doing work in bulk when needed.  But
turned into some additional things.  Change timebase from
mS to uS as, well, things are headed that way.  Implement
an HttpReplyQueue::fetchAll method (advertised one, hadn't
implemented it).
2012-07-10 18:50:21 -04:00
Monty Brandenberg e172ec84fa SH-3184/SH-3221 Improve cleanup, destructor, thread termination, etc. logic in library.
With this commit, the cleanup paths should be production quality.  Unit tests have been
expanded to include cases requiring thread termination and cleanup by the worker thread.
Special operation/request added to support the unit tests.  Thread interface expanded
to include a very aggressive cancel() method that does not do cleanup but prevents the
thread from accessing objects that will be destroyed.
2012-06-23 23:33:50 -04:00
Monty Brandenberg bc7d5b24d1 This sets down the groundwork for dynamic policy classes.
Groundwork is used for the default class which currently represents
texture fetching.  Class options implemented from API user into
HttpLibcurl.  Policy layer is going to start doing some traffic
shaping like work to solve problems with consumer-grade gear.
Need to have dynamic aspects to policies and that starts now...
2012-06-22 19:13:50 -04:00
Monty Brandenberg ed5db30654 Preparing for better shutdown/cleanup logic. 2012-06-21 21:32:33 -04:00
Monty Brandenberg a50944e078 Cleanup: move magic nubmers to new _httpinternal.h header file. 2012-06-19 17:01:02 -04:00
Monty Brandenberg b08125a587 LLMutex recursive lock, global & per-request tracing, simple GET request, LLProxy support, HttpOptions starting to work, HTTP resource waiting fixed.
Non-LLThread-based threads need to do some registration or LLMutex locks taken out in these
threads will not work as expected (SH-3154).  We'll get a better solution later, this fixes
some things for now.  Tracing of operations now supported.  Global and per-request (via
HttpOptions) tracing levels of [0..3].  The 2 and 3 levels use libcurl's VERBOSE mode
combined with CURLOPT_DEBUGFUNCTION to stream high levels of detail into the log.  *Very*
laggy but useful.  Simple GET request supported (no Range: header).  Really just a
degenrate case of a ranged get but supplied an API anyway.  Global option to use the
LLProxy interface to setup CURL handles for either socks5 or http proxy usage.  This
isn't really the most encapsulated way to do this but a better solution will have to
come later.  The wantHeaders and tracing options are now supported in HttpOptions giving
per-request controls.  Big refactoring of the HTTP resource waiter in lltexturefetch.
What I was doing before wasn't correct.  Instead, I'm implementing the resource wait
after the Semaphore model (though not using system semaphores).  So instead of having
a sequence like:  SEND_HTTP_REQ -> WAIT_HTTP_RESOURCE -> SEND_HTTP_REQ, we now
do WAIT_HTTP_RESOURCE -> WAIT_HTTP_RESOURCE2 (actual wait) -> SEND_HTTP_REQ.  Works
well but the prioritized filling of the corehttp library needs some performance
work later.
2012-06-14 16:31:48 -04:00
Monty Brandenberg 7adeb39237 HTTP Proxy, PUT & POST, unit tests and refactoring.
Implemented/modified PUT & POST to not used chunked encoding for the request.
Made the unit test much happier and probably a better thing for the pipeline.
Have a cheesy static & dynamic proxy capability using both local options and
a way to wire into LLProxy in llmessages.  Not a clean thing but it will get
the proxy path working with both socks5 & http proxies.  Refactoring to get
rid of unneeded library handler and unified an HttpStatus return for all
requests.  Big batch of code removed as a result of that and more is possible
as well as some syscall avoidance with a bit more work.  Boosted the unit
tests for simple PUT & POST test which revealed the test harness does *not*
like chunked encoding so we'll avoid it for now (and don't really need it
in any of our schemes).
2012-06-12 17:42:33 -04:00
Monty Brandenberg 267ab5b417 Convert BufferArray interfaces to void * (not char *). HttpRequest::update() honor time limit.
Generally, opaque data operations are expected to be over 'void *' and have
now converted interfaces to do that.  Update() method honors millisecond limit to dwell
time.  Might want to homologate the millis/uSecs mix later....
2012-06-11 17:47:04 -04:00
Monty Brandenberg 05af16a23a Policy + caching fixes + https support + POST working
Implemented first global policy definitions to support SSL CA certificate configuration
to support https: operations.  Fixed HTTP 206 status handling to match what is currently
being done by grid services and to lay a foundation for fixes that will be a response
to ER-1824.  More libcurl CURLOPT options set on easy handles to do peer verification
in the traditional way.  HTTP POST working and now reporting asset metrics back to
grid for the viewer's asset system.  This uses LLSD so that is also showing as compatible
with the new library.
2012-06-06 13:52:38 -04:00
Monty Brandenberg 7b9da4eeda Missed two instances of priority typed as 'float'. Became an
excuse to go through an use a typedef for priority and policy class id.
2012-06-01 17:23:51 -04:00
Monty Brandenberg b8edacd0bb Major steps towards implementing the policy component.
Identified and reacted to the priority inversion problem we
have in texturefetch.  Includes the introduction of a priority_queue
for the requests that are ready.  Start some parameterization in
anticipation of having policy_class everywhere.  Removed _assert.h
which isn't really needed in indra codebase.  Implemented async
setPriority request (which I hope I can get rid of eventually along
with all priorities in this library).  Converted to using unsigned
int for priority rather than float.  Implemented POST and did
groundwork for PUT.
2012-06-01 14:07:34 -04:00
Monty Brandenberg 8fc350125c Integrate llcorehttp library into lltexturefetch design.
This is the first functional viewer pass with the HTTP work of the texture fetch
code performed by the llcorehttp library.  Not exactly a 'drop-in' replacement
but a work-alike with some changes (e.g. handler notification in consumer
thread versus responder notification in worker thread).

This also includes some temporary changes in the priority scheme to prevent
the kind of priority inversion found in VWR-28996.  Scheme used here does
provide liveness if not optimal responsiveness or order-of-operation.

The llcorehttp library at this point is far from optimally performing.
Its worker thread is making relatively poor use of cycles it gets and
it doesn't idle or sleep intelligently yet.  This early integration step
helps shake out the interfaces, implementation niceties will be covered
soon.
2012-05-23 19:12:09 -04:00
Monty Brandenberg 5611cb6d47 Okay, imported the core-http library and got it compiling suspiciously easily.
The unit/integration tests don't work yet as I'm still battling cmake/autobuild
as usual but first milestone passed.
2012-04-23 16:19:39 -04:00