bug 1110707 - dont assume seekable stream on sending_to http events r=valentin

This commit is contained in:
Patrick McManus 2015-01-05 12:08:21 -05:00
parent 0565e62818
commit cf01ffcedf

View File

@ -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);