[FFmpeg-devel] [PATCH] http: handle URLs with spaces
eli at algotec.co.il
Sun Feb 2 10:12:08 CET 2014
>> Basically it's true, but it may be convenient. Some extra option to
>> enable escaping could be an compromise.
>> But it should escape all characters that are not allowed, not just spaces.
> We cannot perform full escaping (urlencode conversion) seamlessly, because we would get spare conversion of "%" sign to "%25" if user has supplied already urlencoded url.
> _Option_ to perform urlencode internally is possible, although i think there are a lot of possibilities to do this conversion outside of ffmpeg.
While there are certain characters such as space that are invalid in URIs in general, the RFC states that they can be percent-encoded. Specifically spaces are very good
candidates to be included in the query string (the part after the ?). Side note - when in the query string they are traditionally "encoded" to plus signs.
FFmpeg *can* urlencode. It can also do so if a certain option is set (just like "cookies" or any other protocol option). However, the question is - do you really want to?
I'm a relatively new observer to this list but IMHO the pros and cons for encoding are these:
Con - URL encoding can be done outside of FFmpeg in many ways and with already existing, proven code.
Pro - In much the same way that http.c implements the HTTP protocol, headers processing, cookies processing and other features, for completeness purposes it should also
have URL encoding capabilities, at least as an option for HTTP.
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel