You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
Hi!. I ask that the error that occurs only in the firefox browser with IPV6 protocol be resolved. The error occurs: Not caught (in promise) DOMException: The URI is malformed. such problem occurs when entering a URL with the IPV6 protocol for example http: // [:: 1]: 8080 / rest / app
I noticed that the error is on the line: xhr.open (request.method, request.getUrl (), true);
I found that the solution to this problem is to change the line mentioned by the line below: xhr.open (request.method, request.url, true);
So that it is solved and works in all browsers (I only tested firefox, google and opera).
vue-resource v1.0.3 and also in version v1.5.1
Code below:
function xhrClient (request) {
return new PromiseObj(function (resolve) {
var xhr = new XMLHttpRequest(),
handler = function (event) {
var response = request.respondWith('response' in xhr ? xhr.response : xhr.responseText, {
status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug
statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)
});
each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) {
response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') 1));
});
resolve(response);
};
request.abort = function () {
return xhr.abort();
};
if (request.progress) {
if (request.method === 'GET') {
xhr.addEventListener('progress', request.progress);
} else if (/^(POST|PUT)$/i.test(request.method)) {
xhr.upload.addEventListener('progress', request.progress);
}
}
xhr.open(request.method,request.getUrl(), true);
if ('responseType' in xhr) {
xhr.responseType = 'blob';
}
if (request.credentials === true) {
xhr.withCredentials = true;
}
request.headers.forEach(function (value, name) {
xhr.setRequestHeader(name, value);
});
xhr.timeout = 0;
xhr.onload = handler;
xhr.onerror = handler;
xhr.send(request.getBody());
});
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Error firefox IPV6 VUE.JS vue-resource.common.js XMLHttpRequest
Hi!. I ask that the error that occurs only in the firefox browser with IPV6 protocol be resolved. The error occurs: Not caught (in promise) DOMException: The URI is malformed. such problem occurs when entering a URL with the IPV6 protocol for example http: // [:: 1]: 8080 / rest / app
I noticed that the error is on the line: xhr.open (request.method, request.getUrl (), true);
I found that the solution to this problem is to change the line mentioned by the line below: xhr.open (request.method, request.url, true);
So that it is solved and works in all browsers (I only tested firefox, google and opera).
vue-resource v1.0.3 and also in version v1.5.1
Code below:
function xhrClient (request) {
return new PromiseObj(function (resolve) {
});
}
The text was updated successfully, but these errors were encountered: