Commit Graph

41 Commits (afdcd356db0a496e8916645eeebc8a03755ee0bd)

Author SHA1 Message Date
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
AiraYumi 7c8907522f replace boost library to standard 2024-01-08 23:29:21 +02:00
Dave Parks b6841d75c2 SL-17219 WIP - Texture pipeline overhaul 2022-04-15 19:02:07 -05:00
Nat Goodspeed 0c7bc67814 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-10-11 14:35:49 -04:00
Rider Linden 79856e6554 MAINT-7634: Feedback from code review, move enum to string converter to own function. 2017-08-14 14:54:58 -07:00
andreykproductengine 1a5fa01fb8 MAINT-7495 Viewer retries too many time apon 504 from login.cgi 2017-07-24 17:06:12 +03: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 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 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 daf4d167b6 Added a seek method to LLCore::Http for data rewind.
A couple of minor changes to merchant out box in hopes that the would fix the issues.
2015-06-05 15:19:24 -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 6f5790da38 Merge. Pull in viewer-release after 3.6.7 release. 2013-10-04 15:36:52 -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
simon ee2fce8790 Merge downstream code and viewer-beta 2013-05-09 14:10:45 -07:00
simon 6e483af1f6 Revert ares and libcurl version update that was causing problems, revise curl
handle duplication code.  Reviewed by Kelly
2013-04-25 14:14:35 -07: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
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Graham Madarasz (Graham) 2dcbbf04c9 Improve curl/ares init behavior by duping handles instead of calling easy_init 2013-02-28 09:45:43 -08:00
Monty Brandenberg 85e69b043b Big comment and naming cleanup. Ready for prime-time.
Add to-do list to _httpinternal.h to guide anyone who
wants to pitch in and help.
2012-07-23 23:40:07 +00:00
Monty Brandenberg d238341afa SH-3189 Remove/improve naive data structures
When releasing HTTP waiters, avoid unnecessary sort activity.
For Content-Type in responses, let libcurl do the work and removed
my parsing of headers.  Drop Content-Encoding as libcurl will deal
with that.  If anyone is interested, they can parse.
2012-07-16 11:53:04 -04:00
Monty Brandenberg 7010459f04 SH-3240 Capture Content-Type and Content-Encoding headers.
HttpResponse object now has two strings for these content headers.
Either or both may be empty.  Tidied up the cross-platform string
code and got more defensive about the length of a header line.
Integration test for the new response object.
2012-07-11 15:53:57 -04:00
Monty Brandenberg f5f51d3cda SH-3185 Fill in some FIXME/TODO cases
Also added some comments and changed the callback userdata argument
to be an HttpOpRequest rather than a libcurl handle.  Less code,
less clutter.
2012-07-07 19:35:32 -04:00
Monty Brandenberg 6b4fe9fadc When a Content-Range header is received, make available the full triplet of <offset, length, fulllength>. 2012-06-19 17:12:20 -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 f0353abe76 Implement timeout and retry count options for requests.
Pretty straightforward.  Still don't like how I'm managing
the options block.  Struct?  Accessors?  Can't decide.  But
the options now speed up the unit test runs even as I add
tests.
2012-06-19 15:43:29 -04:00
Monty Brandenberg 46662a3010 Move dtors for refcounted objects to protected access. 2012-06-18 11:16:58 -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 28a04400b4 Implemented HTTP retry for requests. Went in rather easily which
surprised me.  Added a retry queue similar to ready queue to the
policy object which is sorted by retry time.  Currently do five
retries (after the initial try) delayed by .25, .5, 1, 2 and 5
seconds.  Removed the retry logic from the lltexturefetch module.
Upped the waiting time in the unit test for the retries.  People
won't like this but tough, need tests.
2012-06-08 20:21:54 -04:00
Monty Brandenberg 640798bb99 Platform fixups: typedef for priority_queue, more specific comparator functor. 2012-06-01 18:18:53 -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 239e072bfc Unit test still giving me issues on the local windows system. Seems to be a hard stall
while allocating the first easy handle in a descent of the global initiailization
code but that doesn't seem to be a problem on TC machines.  Perhaps the static
linking is creating multiple data copies.  More work needed.
2012-05-08 12:27:24 -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