mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 666502. DONTBUILD. Document how we make sure HTTP headers have been read by time OnStartRequest called. r=bz
This commit is contained in:
parent
78bbcf1909
commit
f6ae5087c9
@ -4005,6 +4005,7 @@ nsHttpChannel::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
|
||||
|
||||
// don't enter this block if we're reading from the cache...
|
||||
if (NS_SUCCEEDED(mStatus) && !mCachePump && mTransaction) {
|
||||
// mTransactionPump doesn't hit OnInputStreamReady and call this until
|
||||
// all of the response headers have been acquired, so we can take ownership
|
||||
// of them from the transaction.
|
||||
mResponseHead = mTransaction->TakeResponseHead();
|
||||
|
@ -539,8 +539,12 @@ nsHttpTransaction::WritePipeSegment(nsIOutputStream *stream,
|
||||
NS_ASSERTION(*countWritten > 0, "bad writer");
|
||||
trans->mReceivedData = PR_TRUE;
|
||||
|
||||
// now let the transaction "play" with the buffer. it is free to modify
|
||||
// Let the transaction "play" with the buffer. It is free to modify
|
||||
// the contents of the buffer and/or modify countWritten.
|
||||
// - Bytes in HTTP headers don't count towards countWritten, so the input
|
||||
// side of pipe (aka nsHttpChannel's mTransactionPump) won't hit
|
||||
// OnInputStreamReady until all headers have been parsed.
|
||||
//
|
||||
rv = trans->ProcessData(buf, *countWritten, countWritten);
|
||||
if (NS_FAILED(rv))
|
||||
trans->Close(rv);
|
||||
|
Loading…
Reference in New Issue
Block a user