From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- netwerk/streamconv/converters/nsHTTPCompressConv.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'netwerk/streamconv/converters/nsHTTPCompressConv.cpp') diff --git a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp index da430a0611..e06c72222b 100644 --- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp +++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp @@ -264,6 +264,7 @@ nsresult nsHTTPCompressConv::BrotliHandler(nsIInputStream* stream, reinterpret_cast(outBuffer.get()), outSize))) { return self->mBrotli->mStatus; } + self->mBrotli->mSourceOffset += outSize; } // See bug 1759745. If the decoder has more output data, take it. @@ -276,6 +277,7 @@ nsresult nsHTTPCompressConv::BrotliHandler(nsIInputStream* stream, outSize))) { return self->mBrotli->mStatus; } + self->mBrotli->mSourceOffset += outSize; } if (res == BROTLI_DECODER_RESULT_SUCCESS || @@ -295,7 +297,9 @@ nsHTTPCompressConv::OnDataAvailable(nsIRequest* request, nsIInputStream* iStr, uint64_t aSourceOffset, uint32_t aCount) { nsresult rv = NS_ERROR_INVALID_CONTENT_ENCODING; uint32_t streamLen = aCount; - LOG(("nsHttpCompressConv %p OnDataAvailable %d", this, aCount)); + LOG(("nsHttpCompressConv %p OnDataAvailable aSourceOffset:%" PRIu64 + " count:%u", + this, aSourceOffset, aCount)); if (streamLen == 0) { NS_ERROR("count of zero passed to OnDataAvailable"); @@ -561,6 +565,9 @@ nsresult nsHTTPCompressConv::do_OnDataAvailable(nsIRequest* request, MutexAutoLock lock(mMutex); listener = mListener; } + LOG(("nsHTTPCompressConv::do_OnDataAvailable req:%p offset: offset:%" PRIu64 + "count:%u", + request, offset, count)); nsresult rv = listener->OnDataAvailable(request, mStream, offset, count); // Make sure the stream no longer references |buffer| in case our listener -- cgit v1.2.3