rebroadcast: fix content base handling when it is a relative path

This commit is contained in:
Koushik Dutta
2024-08-11 11:40:07 -07:00
parent bcc9be62e9
commit b43a002650
4 changed files with 8 additions and 7 deletions

View File

@@ -726,7 +726,10 @@ export class RtspClient extends RtspBase {
Accept: 'application/sdp',
});
this.contentBase = response.headers['content-base'] || response.headers['content-location'];;
this.contentBase = response.headers['content-base'] || response.headers['content-location'];
// content base may be a relative path? seems odd.
if (this.contentBase)
this.contentBase = new URL(this.contentBase, this.url).toString();
return response;
}