var freeParser = common.freeParser;
var debug = common.debug;
-var IncomingMessage = require('_http_incoming').IncomingMessage;
var OutgoingMessage = require('_http_outgoing').OutgoingMessage;
var Agent = require('_http_agent');
util.inherits(Transform, Duplex);
-function TransformState(options, stream) {
+function TransformState(stream) {
this.afterTransform = function(er, data) {
return afterTransform(stream, er, data);
};
Duplex.call(this, options);
- this._transformState = new TransformState(options, this);
+ this._transformState = new TransformState(this);
// when the writable side finishes, then flush out anything remaining.
var stream = this;
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var assert = require('assert');
-var crypto = require('crypto');
var events = require('events');
var stream = require('stream');
var tls = require('tls');
}
-function onnewsessiondone() {
- if (!this.server) return;
-
- // Cycle through data
- this.cleartext.read(0);
- this.encrypted.read(0);
-}
-
-
function onocspresponse(resp) {
this.emit('OCSPResponse', resp);
}
var opts = normalizeSpawnArguments.apply(null, arguments);
var options = opts.options;
- var envPairs = opts.envPairs;
var i;
return;
}
- var len = fnargs.length;
var args = [];
var i, ret;
if (self._disposed)
return;
- var len = fnargs.length;
- var args = [];
- var i, ret;
+ var ret;
self.enter();
if (fnargs.length > 0)
var O_APPEND = constants.O_APPEND || 0;
var O_CREAT = constants.O_CREAT || 0;
-var O_DIRECTORY = constants.O_DIRECTORY || 0;
var O_EXCL = constants.O_EXCL || 0;
-var O_NOCTTY = constants.O_NOCTTY || 0;
-var O_NOFOLLOW = constants.O_NOFOLLOW || 0;
var O_RDONLY = constants.O_RDONLY || 0;
var O_RDWR = constants.O_RDWR || 0;
-var O_SYMLINK = constants.O_SYMLINK || 0;
var O_SYNC = constants.O_SYNC || 0;
var O_TRUNC = constants.O_TRUNC || 0;
var O_WRONLY = constants.O_WRONLY || 0;
var EventEmitter = require('events').EventEmitter;
-var incoming = require('_http_incoming');
-var IncomingMessage = exports.IncomingMessage = incoming.IncomingMessage;
+exports.IncomingMessage = require('_http_incoming').IncomingMessage;
var common = require('_http_common');
exports.parsers = common.parsers;
-var outgoing = require('_http_outgoing');
-var OutgoingMessage = exports.OutgoingMessage = outgoing.OutgoingMessage;
+exports.OutgoingMessage = require('_http_outgoing').OutgoingMessage;
var server = require('_http_server');
var agent = require('_http_agent');
var Agent = exports.Agent = agent.Agent;
-var globalAgent = exports.globalAgent = agent.globalAgent;
+exports.globalAgent = agent.globalAgent;
var client = require('_http_client');
var ClientRequest = exports.ClientRequest = client.ClientRequest;
this._writeGeneric(false, data, encoding, cb);
};
-// Important: this should have the same values as in src/stream_wrap.h
-function getEncodingId(encoding) {
- switch (encoding) {
- case 'buffer':
- return 0;
-
- case 'utf8':
- case 'utf-8':
- return 1;
-
- case 'ascii':
- return 2;
-
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return 3;
-
- default:
- return 0;
- }
-}
-
function createWriteReq(req, handle, data, encoding) {
switch (encoding) {
case 'buffer':
}
// Resolve expr and get its completions.
- var obj, memberGroups = [];
+ var memberGroups = [];
if (!expr) {
// If context is instance of vm.ScriptContext
// Get global vars synchronously
// Needs to be the same as src/env.h
var kHasListener = 0;
-var kWatchedProviders = 1;
// Flags to determine what async listeners are available.
var HAS_CREATE_AL = 1 << 0;
function runAsyncQueue(context) {
var queue = new Array();
var data = new Array();
- var ccQueue, i, item, queueItem, value;
+ var ccQueue, i, queueItem, value;
context._asyncQueue = queue;
context._asyncData = data;
}
}
- var self = this;
this._processChunk(chunk, flushFlag, cb);
};