curl-users
Re: why curl do not filter spaces left
Date: Wed, 16 Oct 2013 15:37:03 +0200 (CEST)
On Wed, 16 Oct 2013, lazypeople wrote:
> I looked up the faqs and know that the protocol part with a space will cause
> a fatal error.But i do not know why?It seems that it is meaningless for the
> space left .Why do help users filter at the left space when dealing with the
> protocol?
URLs start with a letter per definition, that's why.
Could we add code that ignores initial whitespace? Sure. But nobody has done
so.
But also... if a space is passed in as the first letter of a URL it is as sign
of something sloppy in the user end and then we actually HELP the user by not
just silently handling it. We point out that there's a problem and the user
should fix it - after all the user is passing in a string that isn't a
legitimate URL! Being very liberal in what you accept is not always helping.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2013-10-16