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

spaces in url gives a problem playing any HLS video. #109

Open
erald opened this issue Dec 12, 2022 · 0 comments
Open

spaces in url gives a problem playing any HLS video. #109

erald opened this issue Dec 12, 2022 · 0 comments

Comments

@erald
Copy link

erald commented Dec 12, 2022

Hi,
I had another issue earlier and did not understand completely what was happening.
Anyway I now found on why I was so confused.
When having spaces in the url of the video I want to play things get weird:

My configuration:
` location /hls/ {
vod hls;
alias /videos/;

   		#vod_upstream_extra_args "st=$arg_st&e=$arg_e&name=$arg_name";
    		secure_token_types application/vnd.apple.mpegurl application/dash+xml text/xml;
					secure_token $token;
					secure_token_expires_time 100d;
					secure_token_query_token_expires_time 1h;

					if ($arg_token) {
						set $input_token $arg_token;
					}
					akamai_token_validate $input_token;
					akamai_token_validate_key 09903e590dcd4edac8c7b4134356770a;


					add_header Last-Modified "Sun, 19 Nov 2000 08:52:00 GMT";
					add_header Access-Control-Allow-Headers "*";
					add_header Access-Control-Expose-Headers "Server,range,Content-Length,Content-Range";
					add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS";
					add_header Access-Control-Allow-Origin "*";
					expires 100d;

    }   `

when playing a video without spaces in the url things works perfectly. However I have pity enough a lot of videos with spaces in the url and then things go wrong

The m3u8 file is accepted with code 200 but the TS files are getting code 403. so no video play.

I log the URI I and in case of the m3u8 file it is like this:
"/vid/test video spaces.mp4/index.m3u8"
No problem there but the segments are truncated:
"/vid/test"
so error 403.

I tried to replace the spaces for the escape %20 but that is simply not accepted by the module and the player gives me no compatible video found.

If I take out all token checks it works without problems but have no security at all in that case.
I actually also tried the secure link module but experiencing the same problems.

Seems spaces are really a problem for the system when using secure tokens.

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

No branches or pull requests

1 participant