Open hackwell opened 6 years ago
Hi @Jörg,
I'm very sorry for the late reply! Seems I have missed a couple of issues, since I got no email notifications about them...
That is a weird problem, since the basic authentication is working fine on my Panasonic cameras. I will try to compare it with the http request node tomorrow evening, since you say that the latter node works fine. Will keep you informed !
Kind regards, Bart
Hi Jörg (@hackwell),
My first version of this decoder node was based on the httprequest node, so I was quite surprised in worked in your case only for the httprequest node. But now I remember that my last version uses another library under the hood:
var request = require("request");
...
if (this.credentials && this.credentials.user) {
opts.auth = {
user: this.credentials.user,
pass: this.credentials.password||""
};
}
...
request(opts, function(err, res, body) {
...
}
var http = require("follow-redirects").http;
var https = require("follow-redirects").https;
...
if (this.credentials && this.credentials.user) {
opts.auth = this.credentials.user+":"+(this.credentials.password||"");
}
...
((/^https/.test(urltotest))?https:http).request(opts,function(res) {
...
}
Now to find out why the last library causes troubles in your case. Will have to google a bit further tomorrow ...
Looks like that the basic authentication is not working, i get back an Unauthorized. The credentials are definitely correct and the default http request node works with the urls and the provided credentials.