Commit Graph

3 Commits

Author SHA1 Message Date
Adrien Destugues 895fa41e0b Make handling of Http Authentication thread safe
* Each BHttpAuthentication object is locked on all field accesses,
* They are owned by the BUrlContext and never deleted, so there is no
need for reference-counting them,
* The BUrlContext itself is now reference counted, and all BUrlRequests
hold a reference to it.

This makes sure using the BHttpAuthentication objects from requests is
thread-safe.
2014-06-11 14:11:01 +02:00
Adrien Destugues 9ce2f7e386 Improve HTTP authentication support.
The authentication state is stored (in a hash map, using the domain+path
as a key) in the UrlContext class. It can then be reused for multiple
requests to the same place. We also lookup stored authentications for
parent directories and stop at the first we find.

Authentication state is not stored on disk (unlike cookies), and there
can only be one for each domain+path.
2013-10-28 17:29:20 +01:00
Stephan Aßmus 45939109b4 Patch done by Christophe Huriaux as part of GSoC 2010 "Services Kit" project:
Integrated the classes in the Network Kit (libbnetapi.so). Only the foundation
classed BUrl, BUrlContext, BNetworkCookie, BNetworkCookieJar and the private
HttpTime code is currently compiled. The BUrlProtocol currently contains some
misplaced BUrlProtocolHttp specific stuff, and the HTTP stuff itself has a
dependency on libcrypto and should live in an add-on instead. I've sprinkled
some TODOs in the code, and I've done some renaming compared to the last
version of the GSoC patch. Any help to bring this further along is appreciated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-27 14:03:31 +00:00