Skip to content

Conversation

@bastimeyer
Copy link
Member

@bastimeyer bastimeyer commented Dec 6, 2024

  • Remove BaseURL.join() and replace it with simple urllib.parse.urljoin() calls:
    Appending a trailing path separator is incorrect, and checking for absolute and non-empty components is unnecessary
  • Remove unused BaseURL.is_absolute() property

Fixes #6327

As said in the linked issue, I have no idea why the weird parts[2] += "/" logic was added in the initial DASH implementation.

urllib.parse.urljoin() is IETF RFC 3986 compliant, which is what's required by ISO/IEC 23009-1:2022 5.6.4 (BaseURL processing section of the DASH standard).


@zhenyahacker please have a look and check if that's working for you. Thanks.

@bastimeyer bastimeyer force-pushed the stream/dash/fix-baseurl-join branch 2 times, most recently from f6190ee to 4cbf109 Compare December 6, 2024 15:14
@bastimeyer bastimeyer changed the title stream.dash: fix BaseUrl.join() stream.dash: refactor BaseUrl.join() Dec 6, 2024
@zhenyahacker
Copy link

zhenyahacker commented Dec 6, 2024

Checked the refactored variant and it seems to be working because at least one segment is obtained and played correctly. There is no 404 reports in verbose log.
Unfortunately, it looks like there is another dash-related problem - I`ll open an another issue.

- Remove `BaseURL.join()` and replace it with simple
  `urllib.parse.urljoin()` calls:
  Appending a trailing path separator is incorrect,
  and checking for absolute and non-empty components is unnecessary
- Remove unused `BaseURL.is_absolute()` property
@bastimeyer bastimeyer force-pushed the stream/dash/fix-baseurl-join branch from 4cbf109 to 4220942 Compare December 7, 2024 09:42
@bastimeyer bastimeyer changed the title stream.dash: refactor BaseUrl.join() stream.dash: refactor BaseURL.join() Dec 7, 2024
@bastimeyer bastimeyer merged commit 53ac068 into streamlink:master Dec 7, 2024
22 checks passed
@bastimeyer bastimeyer deleted the stream/dash/fix-baseurl-join branch December 7, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream.dash: incorrect BaseURL joining

2 participants