[FFmpeg-devel] [PATCH] http: handle URLs with spaces

Andrey Utkin andrey.krieger.utkin at gmail.com
Sun Feb 2 20:03:32 CET 2014


2014-02-02 wm4 <nfxjfg at googlemail.com>:
> What is an end-user application supposed to do?
>
> 1. Split input URL into protocol and rest
> 2. Guess all avio protocols which might use http
> 3. Split the http URL in further components
> 4. Do the escape mangling on the path component
> 5. Join them all back
>
> All that in the application code, for every project that uses
> libavformat and wants to do network access? And that for an API that
> isn't even http specific but accepts generic URLs?
>
> This API sure likes causing trouble...

This API does what it is supposed to do.
The point 0 in above list would be "take valid URL from the source
that has formed it".
It's not simpleton Johnny or Tommy who has to hassle with URL and form
it, so we have to help him. URLs get formed in software, and software
is supposed to form them in correct way, if particular software
provides invalid URLs, then blame that software.

-- 
Andrey Utkin


More information about the ffmpeg-devel mailing list