mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
bug 1110707 - dont assume seekable stream on sending_to http events r=valentin
This commit is contained in:
parent
0565e62818
commit
cf01ffcedf
@ -552,11 +552,18 @@ nsHttpTransaction::OnTransportStatus(nsITransport* transport,
|
||||
|
||||
if (status == NS_NET_STATUS_SENDING_TO) {
|
||||
// suppress progress when only writing request headers
|
||||
if (!mHasRequestBody)
|
||||
if (!mHasRequestBody) {
|
||||
LOG(("nsHttpTransaction::OnTransportStatus %p "
|
||||
"SENDING_TO without request body\n", this));
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISeekableStream> seekable = do_QueryInterface(mRequestStream);
|
||||
MOZ_ASSERT(seekable, "Request stream isn't seekable?!?");
|
||||
if (!seekable) {
|
||||
LOG(("nsHttpTransaction::OnTransportStatus %p "
|
||||
"SENDING_TO without seekable request stream\n", this));
|
||||
return;
|
||||
}
|
||||
|
||||
int64_t prog = 0;
|
||||
seekable->Tell(&prog);
|
||||
|
Loading…
Reference in New Issue
Block a user