Fixes bug 90196 "M092 crash [@ nsHttpConnection::OnHeadersAvailable]"

r=bbaetz, sr=dougt, a=dbaron
This commit is contained in:
darin%netscape.com 2001-07-26 00:08:03 +00:00
Родитель da6ce72e74
Коммит fafc726cb0
1 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@ -565,11 +565,20 @@ nsHttpConnection::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
{
LOG(("nsHttpConnection::OnStartRequest [this=%x]\n", this));
if (mTransaction && ctxt) { // do this only once
nsCOMPtr<nsISupports> info;
mSocketTransport->GetSecurityInfo(getter_AddRefs(info));
mTransaction->SetSecurityInfo(info);
// because this code can run before AsyncWrite (AsyncRead) returns, we need
// to capture the write (read) request object. see bug 90196 for an example
// of why this is necessary.
if (ctxt) {
mWriteRequest = request;
// this only needs to be done once, so do it for the write request.
if (mTransaction) {
nsCOMPtr<nsISupports> info;
mSocketTransport->GetSecurityInfo(getter_AddRefs(info));
mTransaction->SetSecurityInfo(info);
}
}
else
mReadRequest = request;
return NS_OK;
}