On Thu, Mar 20, 2014 at 6:05 AM, Daniel Stenberg <[hidden email]> wrote:
> Hi all!
> I'm working on this bug and I pushed a patch to the try server the other
> day. I so wanted to get it merged before its 10th anniversay but I failed.
> The patch makes some prematurely interrupted HTTP transfers generate errors
> where they previously would just be silently fine.
> I got a failed mochitest for this patch that is confusing me. That failing
> test is called "netwerk/test/mochitests/test_partially_cached_content.html".
> I can make the test go through by applying the (ugly) patch I'll show you
> below that modifies nsPipeOutputStream::CloseWithStatus() but I don't
> consider it to be a correct change.
> As I'm a newbie in general in Firefox land and even more so in mochitest and
> Here's the ugly hack that can make the test succeed:
> --- a/xpcom/io/nsPipe3.cpp
> +++ b/xpcom/io/nsPipe3.cpp
> @@ -1055,11 +1055,11 @@ nsPipeOutputStream::Release()
> nsPipeOutputStream::CloseWithStatus(nsresult reason)
> LOG(("OOO CloseWithStatus [this=%x reason=%x]\n", this, reason));
> - if (NS_SUCCEEDED(reason))
> + if (NS_SUCCEEDED(reason) || (reason == NS_ERROR_NET_INTERRUPT))
> reason = NS_BASE_STREAM_CLOSED;
> // input stream may remain open
> mPipe->OnPipeException(reason, true);
> return NS_OK;
> / daniel.haxx.se
> dev-tech-network mailing list
> [hidden email] > https://lists.mozilla.org/listinfo/dev-tech-network