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

Credentials in URL #12

Open
zaptoopa opened this issue Dec 2, 2021 · 2 comments
Open

Credentials in URL #12

zaptoopa opened this issue Dec 2, 2021 · 2 comments

Comments

@zaptoopa
Copy link

zaptoopa commented Dec 2, 2021

Hi perthcpe23,

im not able to display the mjpeg stream when the URL looks like this:

viewer.setUrl("http://$username:$password@$ip:$port/?action=stream");

Without the credentials ($username:$password@) in the URL it works properly.

Do you have a suggestion to solve the problem?

@punyapat-s
Copy link
Collaborator

It is possible that you have to escape url string first.

@zaptoopa
Copy link
Author

zaptoopa commented Dec 3, 2021

thanks for the quick reply, i actually used the string in plain text without variables, but there was no success here either
viewer.setUrl("http://myuser:mypass@10.10.10.101:8080/?action=stream");

or with encoding the character:
viewer.setUrl("http%3A%2F%2Fmyuser%3Amypass%4010.10.10.101%3A8080%2F%3Faction%3Dstream");

as i noted before, the following string works without the credentials:
viewer.setUrl("http://$ip:$port/?action=stream");

Edit:
for the string in plain text without variables the debug error i get with the credentials is:

W/MjpegView: Cannot extract a boundary string from HTTP header with message: Unable to find mjpeg boundary. Use a default value instead.
E/MjpegView: http://myuser:mypass@10.10.10.101:8080/?action=stream

I guess extracting the boundaries doesn't work for this kind of string ("http://a:b@1.2.3.4:1234"), does it?

BTW: i am using mjpg-streamer with the following command: ./mjpg_streamer -i input_uvc.so -o "output_http.so -c myuser:mypass"

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