bf699e11 by David LaPalomento

Don't deliver segments that have been aborted

If an XHR times out, don't ever send the response bytes.
1 parent c140bf10
...@@ -204,6 +204,9 @@ ...@@ -204,6 +204,9 @@
204 if (remaining - value.bandwidth <= 0) { 204 if (remaining - value.bandwidth <= 0) {
205 // send the response body once all bytes have been delivered 205 // send the response body once all bytes have been delivered
206 setTimeout(function() { 206 setTimeout(function() {
207 if (request.aborted) {
208 return;
209 }
207 request.status = 200; 210 request.status = 200;
208 request.response = new Uint8Array(segmentSize * 0.125); 211 request.response = new Uint8Array(segmentSize * 0.125);
209 request.setResponseBody(''); 212 request.setResponseBody('');
......