summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/httpcommon.cpp
AgeCommit message (Collapse)Author
2021-09-03SL-15902 Cleanup gSecAPIHandlerMnikolenko ProductEngine
2021-05-27SL-15211 Remove unsused functionsAndrey Kleshchev
CRYPTO_set_id_callback and CRYPTO_set_locking_callback are no-op in ssl 1.1.x
2020-03-25DRTVWR-494: Use std::thread::id for LLThread::currentID().Nat Goodspeed
LLThread::currentID() used to return a U32, a distinct unsigned value incremented by explicitly constructing LLThread or by calling LLThread:: registerThreadID() early in a thread launched by other means. The latter imposed an unobvious requirement on new code based on std::thread. Using std::thread::id instead delegates to the compiler/library the problem of distinguishing threads launched by any means. Change lots of explicit U32 declarations. Introduce LLThread::id_t typedef to avoid having to run around fixing uses again if we later revisit this decision. LLMutex, which stores an LLThread::id_t, wants a distinguished value meaning NO_THREAD, and had an enum with that name. But as std::thread::id promises that the default-constructed value is distinct from every valid value, NO_THREAD becomes unnecessary and goes away. Because LLMutex now stores LLThread::id_t instead of U32, make llmutex.h #include "llthread.h" instead of the other way around. This makes LLMutex an incomplete type within llthread.h, so move LLThread::lockData() and unlockData() to the .cpp file. Similarly, remove llrefcount.h's #include "llmutex.h" to break circularity; instead forward-declare LLMutex. It turns out that a number of source files assumed that #include "llthread.h" would get the definition for LLMutex. Sprinkle #include "llmutex.h" as needed. In the SAFE_SSL code in llcorehttp/httpcommon.cpp, there's an ssl_thread_id() callback that returns an unsigned long to the SSL library. When LLThread:: currentID() was U32, we could simply return that. But std::thread::id is very deliberately opaque, and can't be reinterpret_cast to unsigned long. Fortunately it can be hashed because std::hash is specialized with that type.
2019-01-14SL-10291 Replace apr_mutex with standard C++11 functionalityandreykproductengine
2016-12-19DRTVWR-418: Use U32 for int (and hex) of HttpStatus in 64-bit too.Nat Goodspeed
Turns out that Monty didn't intend for the int-flavored representation of HttpStatus to expand to 64 bits even when unsigned long is that wide. So change the implicit conversion operator, and its uses, to U32 instead. That produces a consistent toHex() result for both 32-bit and 64-bit builds.
2016-04-04merge with 4.0.3-releaseOz Linden
2015-11-10remove execute permission from many files that should not have itOz Linden
2015-09-21Add cleanup to LLCore prevent occasional crash on exit.Rider Linden
2015-09-15MAINT-5507: Remove llcurl, move constant values and untilities to llcorehttp libRider Linden
2015-03-25Replace appearance responder with new LLCore Appearance Handler.Rider Linden
Prep for some slight cleanup of the code. Add AP_AVATAR Policy
2015-03-23Slightly cleaner than this-> ing everythnig.Rider Linden
2015-03-23Continue with gcc issues.Rider Linden
2015-03-16Removal of RPCXML dep on LLCurl switching to LLCore::HtmlRider Linden
2014-10-10MAINT-4564 HTTP Pipelining is not happening in Drano HTTP Phase 4Monty Brandenberg
Incorporate the new libcurl 7.38.0 build with curl bug 1420 workaround. Add developer-centric testing code to evaluate the workaround or a future fix for 1420.
2014-09-18Documentation. Describe curl bug 1420 testing and how toMonty Brandenberg
reproduce data corruption via timeouts.
2014-09-04Pipelining work. Extend transfer timeout by the pipeline depthMonty Brandenberg
as transfers can appear delayed with deep pipelining and more requests in the pool. Added bad HTTP status error (typically getting a 0 back as HTTP status from libcurl) to the list of retryable errors. There's a response stream problem with libcurl and pipelining that induces this problem. Retrying helps but may not be entirely safe. Watch bug 1420 on the libcurl sourceforge bug tracker. Extend options of test/example program to include un-ranged requests. Document the excessive data transfer induced when ranged requests are disabled. This is an abnormal mode for very rare users so we'll just eat that for now.
2013-10-04Merge. Pull in viewer-release after 3.6.7 release.Monty Brandenberg
2013-09-24SH-3690 SH-4505 Cleanup pass through code.Monty Brandenberg
Start using DNS cache in legacy LLCurl code. Go to 15 seconds particularly as we're using threaded resolver at this point. Documentation cleanup. Add libcurl status checking and logging for curl_easy_setopt() operations that fail. Shouldn't happen and we'll just continue anyway but there's info in the logs to track these down now. Cleaned up logic around FASTTIMER enable defines used to evaluate pipeline stalls in main thread. Removed long-standing thread race around caps strings and URL construction. Not a significant risk but refactoring the code to get rid of them removed one huge eyesore. It can be made even slicker if desired (see notes).
2013-09-11SH-4490 More 'humane' error code presentation from llcorehttp callersMonty Brandenberg
Added toTerseString() conversion on HttpStatus to generate a string that's more descriptive than the hex value of the HttpStatus value but still forms a short, searchable token (e.g. "Http_503" or "Core_7"). Using this throughout the viewer now, no live cases of toHex(), I believe.
2013-05-09Merge downstream code and viewer-betasimon
2013-05-06BUG-2295/MAINT-2624 unexpected crash around Content-Range: header processingMonty Brandenberg
Not certain what the source of the short data is with one resident but I'm going to make these problems retryable as they are transport-related. Lift the retry detection into a method that should be reusable by others interested in determining what is retryable. Trace output handling on the libcurl debug callback was attrocious. Some unsafe length handling on my part was protected by a second layer of defense. Made that correct and more useful by logging actual data sizes during trace.
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2012-07-16SH-3189 Remove/improve naive data structuresMonty Brandenberg
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-06-19Cleanup: move magic nubmers to new _httpinternal.h header file.Monty Brandenberg
2012-06-06Policy + caching fixes + https support + POST workingMonty Brandenberg
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-01Platform fixups Linux: unused variables, make error strings constant.Monty Brandenberg
2012-06-01Major steps towards implementing the policy component.Monty Brandenberg
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-05-23Integrate llcorehttp library into lltexturefetch design.Monty Brandenberg
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-04-23Okay, imported the core-http library and got it compiling suspiciously easily.Monty Brandenberg
The unit/integration tests don't work yet as I'm still battling cmake/autobuild as usual but first milestone passed.