mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 20:25:44 +00:00
merge
This commit is contained in:
commit
b58d35fb1e
@ -88,9 +88,14 @@ dump("%%%Generated data\n");
|
||||
let matches = meta.getHeader("Range").match(/^\s*bytes=(\d+)?-(\d+)?\s*$/);
|
||||
let from = (matches[1] === undefined) ? 0 : matches[1];
|
||||
let to = (matches[2] === undefined) ? data.length - 1 : matches[2];
|
||||
dump("%%%meta.getHeader('Range'): " + meta.getHeader("Range") + "\n");
|
||||
dump("%%%from: " + from + "\n");
|
||||
dump("%%%to: " + to + "\n");
|
||||
dump("%%%data.length: " + data.length + "\n");
|
||||
if (from >= data.length) {
|
||||
resp.setStatusLine(meta.httpVersion, 416, "Start pos too high");
|
||||
resp.setHeader("Content-Range", "*/" + data.length);
|
||||
dump("%%% Returning early - from >= data.length\n");
|
||||
return;
|
||||
}
|
||||
body = body.substring(from, to + 1);
|
||||
@ -139,10 +144,13 @@ dump("%%%aDl.state: DOWNLOAD_FINISHED\n");
|
||||
aDl.targetFile.remove(false);
|
||||
// we're done with the test!
|
||||
do_test_finished();
|
||||
}
|
||||
} else
|
||||
dump("%%%aDl.state: " + aDl.state + "\n");
|
||||
},
|
||||
onStateChange: function(a, b, aState, d, aDl) {
|
||||
dump("%%%onStateChange\n");
|
||||
dump("%%%aState: " + aState + "\n");
|
||||
dump("%%%status: " + d + "\n");
|
||||
if ((aState & nsIWPL.STATE_STOP) && didPause && !didResumeServer &&
|
||||
!didResumeDownload) {
|
||||
/**
|
||||
|
@ -113,7 +113,7 @@ do
|
||||
echo -n "$t: "
|
||||
if [ `echo $t | grep -c 'test_sleep_wake.js'` != 0 ]
|
||||
then
|
||||
NATIVE_TOPSRCDIR="$native_topsrcdir" TOPSRCDIR="$topsrcdir" $xpcshell -s $headfiles -f $t $tailfiles
|
||||
NATIVE_TOPSRCDIR="$native_topsrcdir" TOPSRCDIR="$topsrcdir" NSPR_LOG_MODULES="nsHttp:5" $xpcshell -s $headfiles -f $t $tailfiles
|
||||
else
|
||||
NATIVE_TOPSRCDIR="$native_topsrcdir" TOPSRCDIR="$topsrcdir" $xpcshell -s $headfiles -f $t $tailfiles 2> $t.log 1>&2
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user