<html><head></head><body>Hi,<br><br>#3435 does not specify the context, and I'm not going to ask the notoriously troll-prone Slackware VLC maintainer what they meant 11 years ago. The far most common occurrences of unencoded URL white spaces are playlist files (in a large sense) and redirects. Both are already handled. As far as I am concerned, the bug is fixed.<br><br>I don't even see what filesystems have to do with this. The directory access modules are perfectly capable of encoding file paths correctly from the very beginning.<br><br>The only real problem that I know, is the UI dialog which rejects invalid chars. And this patchset doesn't address that.<br><br><div class="gmail_quote">Le 9 octobre 2020 11:23:29 GMT+03:00, Alexandre Janniaux <ajanni@videolabs.io> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi,<br><br>On Fri, Oct 09, 2020 at 10:01:36AM +0200, Thomas Guillem wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> "VLC should automatically replace spaces with %20 like all browsers do"<br><br> It's not the case when I type: ./vlc "https://server/file name.mp3"<br><br> So, how can you say that #3435 is fixed?<br><br> You are right about one point, it should not be done in http modules, but at a higher level when we know the url come from an user.<br></blockquote><br>If it comes from the user, shouldn't it be fixed in the interface? (which<br>would be the only point where the URL would be fixed up, including non<br>interactive inputs interface like playlist demuxers).<br><br>A note here: fixing url in one way will always break some other invalid<br>use cases that happened to work before. That's a non-issue because they<br>are invalid anyway but we should probably focus on the use case that<br>actually brings UX improvement like the space change, which happens<br>regularily if you have a list of files to play from a server and get<br>the name (not encoded) from the FS.<br><br>Regards,<br>--<br>Alexandre Janniaux<br>Videolabs<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">On Fri, Oct 9, 2020, at 09:59, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> Hi,<br><br> #3435 is fixed. VLC can parse file paths and insufficiently encoded URLs from playlists or redirects just fine. We have to do the fixup there in the producer so that relative-to-absolute resolution works.m properly.<br><br> Validation must be done in access because it can't be done earlier due to the different rules for different MRL schemes.<br><br> Le 9 octobre 2020 10:41:28 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> I remember a previous discussion where we said it was the responsibility of the access modules to do this fixup.<br><br> cf. <a href="https://trac.videolan.org/vlc/ticket/18991">https://trac.videolan.org/vlc/ticket/18991</a> and <a href="https://git.videolan.org/?p=vlc.git;a=commit;h=762ca1e8a01278b34ddb34765f3339690aad5d2e">https://git.videolan.org/?p=vlc.git;a=commit;h=762ca1e8a01278b34ddb34765f3339690aad5d2e</a><br><br> I'm not sure that URLs are fixed up at this point.<br><br> How do you propose to fix #3435 <<a href="https://trac.videolan.org/vlc/ticket/3435">https://trac.videolan.org/vlc/ticket/3435</a>> then? Because you said it was fixed but it is *not*. VLC can't handle unvalid http URLs with a " ". Every other player or browsers can.<br><br> On Fri, Oct 9, 2020, at 09:26, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"> URLs are already fixed up when they get to this point. Fixing up URLs twice is a recipe for disaster. We've tried.<br><br> -1<br><br> Le 9 octobre 2020 09:56:58 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> This will allow VLC to open unvalid URLs (using a space instead of the<br> %20 encoding, for example). Every other browsers or players are doing<br> this fixup.<br><br> Fixes #3435 modules/access/http/access.c | 12 ++++++++++--<br> 1 file changed, 10 insertions(+), 2 deletions(-)<br><br> diff --git a/modules/access/http/access.c b/modules/access/http/access.c<br> index a3805d0d426..123daaf51d3 100644<br> --- a/modules/access/http/access.c<br> +++ b/modules/access/http/access.c<br> @@ -171,19 +171,27 @@ static int Open(vlc_object_t *obj)<br> struct vlc_url_t crd_url;<br> char *psz_realm = NULL;<br><br> - vlc_UrlParse(&crd_url, access->psz_url);<br> + char *url_fixup = vlc_uri_fixup(access->psz_url);<br> + if (url_fixup == NULL)<br> + goto error;<br> +<br> + vlc_UrlParse(&crd_url, url_fixup);<br> vlc_credential_init(&crd, &crd_url);<br><br> sys->manager = vlc_http_mgr_create(obj, jar);<br> if (sys->manager == NULL)<br> + {<br> + free(url_fixup);<br> goto error;<br> + }<br><br> char *ua = var_InheritString(obj, "http-user-agent");<br> char *referer = var_InheritString(obj, "http-referrer");<br> bool live = var_InheritBool(obj, "http-continuous");<br><br> sys->resource = (live ? vlc_http_live_create : vlc_http_file_create)(<br> - sys->manager, access->psz_url, ua, referer);<br> + sys->manager, url_fixup, ua, referer);<br> + free(url_fixup);<br> free(referer);<br> free(ua);<br></blockquote>--<br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote></blockquote>--<br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote></blockquote><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>