add deploy.yaml
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Marko
2022-07-19 15:39:38 +02:00
parent 5302e6ca99
commit b0f7f04ba6
6 changed files with 38 additions and 44 deletions

View File

@@ -17,8 +17,7 @@ exports.FetchStream = FetchStream;
exports.CookieJar = CookieJar;
exports.fetchUrl = fetchUrl;
function FetchStream(url, options)
{
function FetchStream(url, options) {
Stream.call(this);
options = options || {};
@@ -173,7 +172,7 @@ FetchStream.prototype.parseUrl = function (url) {
path: urlparts.pathname + (urlparts.search || '') || '/',
method: this.options.method,
rejectUnauthorized: this.options.rejectUnauthorized
};
};
switch (urlparts.protocol) {
case 'https:':
@@ -186,17 +185,17 @@ FetchStream.prototype.parseUrl = function (url) {
}
if (transport === https) {
if ('agentHttps' in this.options) {
if('agentHttps' in this.options){
urloptions.agent = this.options.agentHttps;
}
if ('agent' in this.options) {
if('agent' in this.options){
urloptions.agent = this.options.agent;
}
} else {
if ('agentHttp' in this.options) {
if('agentHttp' in this.options){
urloptions.agent = this.options.agentHttp;
}
if ('agent' in this.options) {
if('agent' in this.options){
urloptions.agent = this.options.agent;
}
}
@@ -383,8 +382,7 @@ FetchStream.prototype._runStream = function (url_data, url) {
}
};
function fetchUrl(url, options, callback)
{
function fetchUrl(url, options, callback) {
if (!callback && typeof options === 'function') {
callback = options;
options = undefined;
@@ -455,8 +453,7 @@ function fetchUrl(url, options, callback)
});
}
function _parseContentType(str)
{
function _parseContentType(str) {
if (!str) {
return {};
}
@@ -479,8 +476,7 @@ function _parseContentType(str)
};
}
function _findHTMLCharset(htmlbuffer)
{
function _findHTMLCharset(htmlbuffer) {
var body = htmlbuffer.toString('ascii'),
input, meta, charset;