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

wm4 nfxjfg at googlemail.com
Sun Feb 2 22:09:05 CET 2014


On Sun, 2 Feb 2014 20:26:59 +0000
Eli Kara <eli at algotec.co.il> wrote:

> 
> > 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... 
> 
> I just have to mention this - wget's code is a heuristic. It decides certain things and assumes this is the correct behavior for everyone. While this may be true 90%
> of the time you have to realize there is no rule that fits all. Also, browsers can be really dumb if the like. They can assume in 99% of cases a user will not enter a URL-encoded URL :)

Yes, I've said that before. It's in fact the reason why my initial
patch changes spaces only, which are always invalid.

> Having said that - consider another thing. FFmpeg exists for quite a bit of time now. If you blindly decide to URL encode all URLs (regardless of algorithm) you will break many user's
> Behaviors. Again taking XBMC as an example - all content server via HTTP that is reached by add-ons passes escaped URLs. Also for library entries. If FFmpeg encodes them for the
> second time you'll break behavior for millions of users. That's not something you decide on lightly just because up until now the library was not conformant.
> 
> An API way of deciding this or at least enabling/disabling the behavior is a must IMO.
> Eli
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



More information about the ffmpeg-devel mailing list