[fpc-pascal] fphttpclient get an url with colon

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Feb 17 21:10:46 CET 2012


On Fri, 17 Feb 2012 22:03:25 +0200
Alberto Narduzzi <albertonarduzzi at yahoo.com> wrote:

> > I doubt that mediawiki uses malformed urls.
> > And any browser and http client uses it without warning.
> 
> as I said, it was out of curiosity.
> 
> Googling around anyway, shows that there are some special characters out 
> there (obviously), which are meant to compose the url itself: colon, 
> slash, dot, q.mark, ampersand, percent, etc. etc.
> 
> To use them in a url for your special purposes, you should at least 
> escape them; if not for anything else, at least for those not-so-smart 
> browsers (or http-client components...).
> 
> Try replacing the colon with %3A and see if the component adds a slash 
> at the end as well. It should not IMHO.
> 
> Anyway, "http://wiki.lazarus.freepascal.org?Image=Acs_demos.jpg" is not 
> that ugly. Probably it's not so sophisticated, but can do the very same job.

Yes, this is a workaround.

But my question is why only the fphttpclient has a problem with
colon while all others support it. I hope this can be changed
somehow. I don't know if in ParseURI or in fphttpclient.

Mattias



More information about the fpc-pascal mailing list