mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
[partial fix] DevTools - network - proxy - throws an errors (remoteAddress)
https://github.com/MoonchildProductions/moebius/pull/63
This commit is contained in:
parent
e1f7b9e459
commit
5f86e6fd8b
1 changed files with 18 additions and 2 deletions
|
|
@ -1327,8 +1327,24 @@ NetworkMonitor.prototype = {
|
|||
|
||||
let response = {};
|
||||
response.httpVersion = statusLineArray.shift();
|
||||
response.remoteAddress = httpActivity.channel.remoteAddress;
|
||||
response.remotePort = httpActivity.channel.remotePort;
|
||||
// XXX:
|
||||
// Sometimes, when using a proxy server (manual proxy configuration),
|
||||
// throws an errors:
|
||||
// 0x80040111 (NS_ERROR_NOT_AVAILABLE)
|
||||
// [nsIHttpChannelInternal.remoteAddress]
|
||||
// Bug 1337791 is the suspect.
|
||||
response.remoteAddress = null;
|
||||
try {
|
||||
response.remoteAddress = httpActivity.channel.remoteAddress;
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
response.remotePort = null;
|
||||
try {
|
||||
response.remotePort = httpActivity.channel.remotePort;
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
response.status = statusLineArray.shift();
|
||||
response.statusText = statusLineArray.join(" ");
|
||||
response.headersSize = extraStringData.length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue