Make sure we never give a NULL context to requests.
Use a default context instead. This allows apps without a context management to still have cookies and HTTP digest authentication (without persistence to disk). First part of fix to #10239 (it also needs changes in WebKit).
This commit is contained in:
parent
c9a5d95df2
commit
4192f44dc4
@ -17,10 +17,16 @@
|
||||
#include <Debug.h>
|
||||
|
||||
|
||||
static BUrlContext gDefaultContext;
|
||||
|
||||
|
||||
/* static */ BUrlRequest*
|
||||
BUrlProtocolRoster::MakeRequest(const BUrl& url,
|
||||
BUrlProtocolListener* listener, BUrlContext* context)
|
||||
{
|
||||
if(context == NULL)
|
||||
context = &gDefaultContext;
|
||||
|
||||
// TODO: instanciate the correct BUrlProtocol using add-on interface
|
||||
if (url.Protocol() == "http") {
|
||||
return new(std::nothrow) BHttpRequest(url, false, "HTTP", listener,
|
||||
|
Loading…
Reference in New Issue
Block a user