upnp: minor.
This commit is contained in:
parent
3f3516ca18
commit
1b94d670c2
@ -697,12 +697,12 @@ function findError(el) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function parseHost(uri) {
|
function parseHost(uri) {
|
||||||
let data = url.parse(uri);
|
let {protocol, host} = url.parse(uri);
|
||||||
|
|
||||||
assert(data.protocol === 'http:' || data.protocol === 'https:',
|
assert(protocol === 'http:' || protocol === 'https:',
|
||||||
'Bad URL for location.');
|
'Bad URL for location.');
|
||||||
|
|
||||||
return `${data.protocol}//${data.host}`;
|
return `${protocol}//${host}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function prependHost(host, uri) {
|
function prependHost(host, uri) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user