Skip to content
Myr

using Stream#pipe() instead of sys.pump()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 0818692 · Browse files · 1 file+3 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−4 removed

  • other:+3 added−4 removed

1 file+3 added−4 removed

modified:lib/response.js+3 added-4 removed
10 unmodified lines
1112var fs = require('fs')13 , http = require('http')14 , path = require('path')15 , pump = require('sys').pump15 , utils = require('connect').utils16 , parseRange = require('./utils').parseRange18 , mime = utils.mime19 , res = http.ServerResponse.prototype;17 , res = http.ServerResponse.prototype18 , mime = utils.mime;1920/**21 * Header fields supporting multiple values.22 *
155 unmodified lines
178 self.contentType(path);179 self.header('Accept-Ranges', 'bytes');180 self.writeHead(status, self.headers);181 if (head) return self.end();183 pump(stream, self);182 stream.pipe(self);183 });184};185186/**
202 unmodified lines