diff options
author | seebees <seebees@gmail.com> | 2011-10-19 16:28:44 -0700 |
---|---|---|
committer | koichik <koichik@improvement.jp> | 2011-10-22 14:14:40 +0900 |
commit | 216570b5e1b1263083f145566112d3f343a2264b (patch) | |
tree | 955b507135ec2a58fa616c93cf0848f3419487ea /lib | |
parent | a2eaddaa514847aff5557223d9cd2b537d9017eb (diff) | |
download | android-node-v8-216570b5e1b1263083f145566112d3f343a2264b.tar.gz android-node-v8-216570b5e1b1263083f145566112d3f343a2264b.tar.bz2 android-node-v8-216570b5e1b1263083f145566112d3f343a2264b.zip |
Lint
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.js | 14 | ||||
-rw-r--r-- | lib/url.js | 8 |
2 files changed, 12 insertions, 10 deletions
diff --git a/lib/http.js b/lib/http.js index 2d298203a9..9eb3b50d54 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1015,7 +1015,7 @@ function ClientRequest(options, cb) { if (options.port && +options.port !== options.defaultPort) { hostHeader += ':' + options.port; } - this.setHeader("Host", hostHeader); + this.setHeader('Host', hostHeader); } } @@ -1032,9 +1032,11 @@ function ClientRequest(options, cb) { } if (Array.isArray(options.headers)) { - self._storeHeader(self.method + ' ' + self.path + ' HTTP/1.1\r\n', options.headers); + self._storeHeader(self.method + ' ' + self.path + ' HTTP/1.1\r\n', + options.headers); } else if (self.getHeader('expect')) { - self._storeHeader(self.method + ' ' + self.path + ' HTTP/1.1\r\n', self._renderHeaders()); + self._storeHeader(self.method + ' ' + self.path + ' HTTP/1.1\r\n', + self._renderHeaders()); } if (self.socketPath) { self._last = true; @@ -1060,9 +1062,9 @@ function ClientRequest(options, cb) { } } - self._deferToConnect(null, null, function () { + self._deferToConnect(null, null, function() { self._flush(); - }) + }); } util.inherits(ClientRequest, OutgoingMessage); @@ -1095,7 +1097,7 @@ function createHangUpError() { ClientRequest.prototype.onSocket = function(socket) { var req = this; - process.nextTick(function () { + process.nextTick(function() { var parser = parsers.alloc(); req.socket = socket; req.connection = socket; diff --git a/lib/url.js b/lib/url.js index f6d8631651..7a28e0064b 100644 --- a/lib/url.js +++ b/lib/url.js @@ -234,7 +234,7 @@ function urlParse(url, parseQueryString, slashesDenoteHost) { } out.hostname = newOut.join('.'); - out.host = (out.hostname || '') + + out.host = (out.hostname || '') + ((out.port) ? ':' + out.port : ''); out.href += out.host; } @@ -419,7 +419,7 @@ function urlResolveObject(source, relative) { //to support http.request if (source.pathname !== undefined || source.search !== undefined) { source.path = (source.pathname ? source.pathname : '') + - (source.search ? source.search : ''); + (source.search ? source.search : ''); } source.slashes = source.slashes || relative.slashes; source.href = urlFormat(source); @@ -504,7 +504,7 @@ function urlResolveObject(source, relative) { //to support http.request if (source.pathname !== undefined || source.search !== undefined) { source.path = (source.pathname ? source.pathname : '') + - (source.search ? source.search : ''); + (source.search ? source.search : ''); } source.href = urlFormat(source); return source; @@ -590,7 +590,7 @@ function urlResolveObject(source, relative) { //to support request.http if (source.pathname !== undefined || source.search !== undefined) { source.path = (source.pathname ? source.pathname : '') + - (source.search ? source.search : ''); + (source.search ? source.search : ''); } source.auth = relative.auth || source.auth; source.slashes = source.slashes || relative.slashes; |