<html><head></head><body>Hi,<br><br>The GUI is free to accept whatever syntax it wants. Again, this patchset won't fix anything because the current GUI will reject white spaces upfront.<br><br>CLI is however not fixable. You can improve some scenarii but it's intrinsically not possible to handle all of them. In particular, pasting a URL (properly encoded or not) to your shell will never work, because of some special characters such as ampersand. I'm painfully aware that it's annoying, but that's that. You just have to be proper when using the CLI.<br><br><div class="gmail_quote">Le 9 octobre 2020 11:53:39 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 11:34:59AM +0300, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> 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></blockquote><br>In my own use case, http url that are not correctly encoded is much<br>more common than playlist, that I just don't use. But yes, redirect<br>was fixed:<br><br>modules/access/http/resource.c:    char *fixed = vlc_uri_fixup(location);<br><br>and playlist too:<br><br>modules/demux/playlist/playlist.c:    char *rel = vlc_uri_fixup(str);<br><br>But not interface input, which is exactly what #3435 is about, and it<br>is clear given the analogy with browser. So it seems to be a Qt, macosx,<br>ncurses, etc UX improvement.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">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></blockquote><br>AFAIK, directory access module is not opening HTTP urls. I was talking<br>about opening URL by copying a filename from the remote filesystem and<br>appending the server URL. But in this case it goes through the interface<br>which could consider the URL input as «potentially not valid» and bring<br>UX improvement here. Since it's not in the pipeline, it would never<br>double<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> The only real problem that I know, is the UI dialog which rejects invalid chars. And this patchset doesn't address that.<br><br> Le 9 octobre 2020 11:23:29 GMT+03:00, Alexandre Janniaux <ajanni@videolabs.io> a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">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 #8ae234; padding-left: 1ex;">"VLC should automatically replace spaces with %20 like all browsers<br></blockquote>do"<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> 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,<br></blockquote>but at a higher level when we know the url come from an user.<br><br>If it comes from the user, shouldn't it be fixed in the interface?<br>(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 #8ae234; 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 #fcaf3e; padding-left: 1ex;"> Hi,<br><br> #3435 is fixed. VLC can parse file paths and insufficiently encoded<br></blockquote></blockquote>URLs from playlists or redirects just fine. We have to do the fixup<br>there in the producer so that relative-to-absolute resolution works.m<br>properly.<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;">Validation must be done in access because it can't be done earlier<br></blockquote></blockquote>due to the different rules for different MRL schemes.<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;">Le 9 octobre 2020 10:41:28 GMT+03:00, Thomas Guillem<br></blockquote></blockquote><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;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;">I remember a previous discussion where we said it was the<br></blockquote></blockquote></blockquote>responsibility of the access modules to do this fixup.<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;">cf. <a href="https://trac.videolan.org/vlc/ticket/18991">https://trac.videolan.org/vlc/ticket/18991</a> and<br></blockquote></blockquote></blockquote><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><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> I'm not sure that URLs are fixed up at this point.<br><br> How do you propose to fix #3435<br></blockquote></blockquote></blockquote><<a href="https://trac.videolan.org/vlc/ticket/3435">https://trac.videolan.org/vlc/ticket/3435</a>> then? Because you said it<br>was fixed but it is *not*. VLC can't handle unvalid http URLs with a "<br>". Every other player or browsers can.<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;">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 #ccc; padding-left: 1ex;">URLs are already fixed up when they get to this point. Fixing up<br></blockquote></blockquote></blockquote></blockquote>URLs twice is a recipe for disaster. We've tried.<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> -1<br><br> Le 9 octobre 2020 09:56:58 GMT+03:00, Thomas Guillem<br></blockquote></blockquote></blockquote></blockquote><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;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;">This will allow VLC to open unvalid URLs (using a space instead<br></blockquote></blockquote></blockquote></blockquote></blockquote>of the<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;">%20 encoding, for example). Every other browsers or players are<br></blockquote></blockquote></blockquote></blockquote></blockquote>doing<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 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<br></blockquote></blockquote></blockquote></blockquote></blockquote>b/modules/access/http/access.c<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 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 :<br></blockquote></blockquote></blockquote></blockquote></blockquote>vlc_http_file_create)(<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;">-        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<br></blockquote></blockquote></blockquote></blockquote>excuser ma brièveté.<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; 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></blockquote>--<br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez<br></blockquote></blockquote>excuser ma brièveté.<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; 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><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><br></blockquote>--<br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.<br></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>