Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL path prefix works only if it contains dash #55

Open
ed-asriyan opened this issue Aug 28, 2024 · 2 comments
Open

URL path prefix works only if it contains dash #55

ed-asriyan opened this issue Aug 28, 2024 · 2 comments

Comments

@ed-asriyan
Copy link

Based on #37 (comment).

How to reproduce:

  1. Run hlsd -v 3 --host "example.com:443" --port 8080
  2. Make request http://localhost:8080/smth/{base64}.m3u8

Actual result:
400 bad request

Expected result:
HLS file with links containing https://example.com:443/smth/....

However, if you make request with dash inside the URL path prefix, for example http://localhost:8080/smt-h/{base64}.m3u8, it works as expected

@ed-asriyan ed-asriyan changed the title Bub URL path prefix works only if it has dash URL path prefix works only if it contains dash Aug 28, 2024
@warren-bank
Copy link
Owner

warren-bank commented Aug 28, 2024

off-hand, I'd guess that the comment made for major version 2.x regarding the Express.js route is relevant to your usage.. since smth/ are all valid base64 characters.. and by inserting - (or any other character that isn't valid for base64 encoding) would cause the path up to and including the directory containing this invalid character to be excluded.. and the base64 string would begin following the next / character.

note: using v3.x with Express.js can workaround this limitation.

aside: using a URL-safe base64 charset would've made life simpler.. hindsight; I'm probably locked in at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants