fixing linter issues.

This commit is contained in:
ali.ibrahim 2016-10-12 12:29:25 +02:00
parent d21def7b8d
commit ae1c33b863
3 changed files with 556 additions and 573 deletions

View file

@ -334,7 +334,7 @@ void URLRequest::OnAuthenticationRequired(
if (!atom_request_) {
return;
}
EmitRequestEvent(
false,
"login",

View file

@ -19,8 +19,8 @@ class IncomingMessage extends Readable {
constructor (urlRequest) {
super()
this._url_request = urlRequest
this._shouldPush = false;
this._data = [];
this._shouldPush = false
this._data = []
this._url_request.on('data', (event, chunk) => {
this._storeInternalData(chunk)
this._pushInternalData()
@ -59,26 +59,26 @@ class IncomingMessage extends Readable {
return this._url_request.rawResponseHeaders
}
get rawTrailers() {
throw (new Error('HTTP trailers are not supported.'))
get rawTrailers () {
throw new Error('HTTP trailers are not supported.')
}
get trailers() {
throw (new Error('HTTP trailers are not supported.'))
get trailers () {
throw new Error('HTTP trailers are not supported.')
}
_storeInternalData(chunk) {
_storeInternalData (chunk) {
this._data.push(chunk)
}
_pushInternalData() {
_pushInternalData () {
while (this._shouldPush && this._data.length > 0) {
const chunk = this._data.shift()
this._shouldPush = this.push(chunk)
const chunk = this._data.shift()
this._shouldPush = this.push(chunk)
}
}
_read() {
_read () {
this._shouldPush = true
this._pushInternalData()
}
@ -141,7 +141,6 @@ class ClientRequest extends EventEmitter {
}
}
if (options.path && / /.test(options.path)) {
// The actual regex is more like /[^A-Za-z0-9\-._~!$&'()*+,;=/:@]/
// with an additional rule for ignoring percentage-escaped characters
@ -150,9 +149,9 @@ class ClientRequest extends EventEmitter {
// why it only scans for spaces because those are guaranteed to create
// an invalid request.
throw new TypeError('Request path contains unescaped characters.')
}
}
let pathObj = url.parse(options.path || '/')
urlObj.pathname = pathObj.pathname
urlObj.pathname = pathObj.pathname
urlObj.search = pathObj.search
urlObj.hash = pathObj.hash
urlStr = url.format(urlObj)

File diff suppressed because it is too large Load diff