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

double "/" cause http server to fail #323

Closed
bol-van opened this issue Jul 1, 2018 · 8 comments
Closed

double "/" cause http server to fail #323

bol-van opened this issue Jul 1, 2018 · 8 comments
Labels
client Client Issue libupnp

Comments

@bol-van
Copy link

bol-van commented Jul 1, 2018

curl http://192.168.2.7:49152/description.xml

<URLBase>http://192.168.2.7:49152/</URLBase>

Then SAMSUNG TV queries

http://192.168.2.7:49152//cm.xml

get 400 Bad request
and all futher queries come with double /

@bol-van
Copy link
Author

bol-van commented Jul 1, 2018

Http servers should ignore multiple ////
test on any http server and it will work with any number of / in any part

@bol-van
Copy link
Author

bol-van commented Jul 1, 2018

its not gerbera issue, but libupnp

this allows samsung tv to browse folder :


		if (membuffer_append_str(&url_str, "http://") != 0 ||
		    membuffer_append_str(&url_str, ip_str) != 0 ||
/*		    membuffer_append_str(&url_str, "/") != 0 || */
		    membuffer_append_str(&root_path, "/") != 0) {
			goto error_handler;
		}

@whyman
Copy link
Member

whyman commented Jul 1, 2018

Hi @bol-van, thanks for reporting.

Can you report this upstream with https://github.com/mrjimenez/pupnp?

Thanks!

@TimelessNL
Copy link

TimelessNL commented Apr 12, 2020

Any progress on this?
This is probably why my 2012 TVs in #352 are not working I suppose.
MediaTomb seems to had a workaround in place as well. To remove excessive slashes:

+
+        //remove excessive leading slashes (fix for Samsung Smart TV 2012)
+        while( ( ( begin_path + 1 ) < max ) && ( in[begin_path] == '/' ) && ( in[begin_path + 1] == '/') ) {
+            begin_path++;
+        }
+

@pamapa
Copy link
Member

pamapa commented Apr 17, 2020

is this still an issue with the latest master version of gerbera?

@TimelessNL
Copy link

I've tested Gerbera v1.4.0 and libupnp v1.8.6 and that needed the fix. I could test master is there any reason to believe that it has been sorted?

@pamapa pamapa added the client Client Issue label May 6, 2020
@pamapa
Copy link
Member

pamapa commented May 6, 2020

I have landed a fix (pupnp/pupnp@dc2c54b) to address this issue within libupnp, should be part of the next release (v1.12.2).

@pamapa
Copy link
Member

pamapa commented Jan 10, 2021

fixed in pupnp when using a recent release: 1.12.1 or higher

@pamapa pamapa closed this as completed Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Client Issue libupnp
Projects
None yet
Development

No branches or pull requests

4 participants