Currently I'm starting some research on HTTP downloads with ICS THttpCli.
I want to add recursive download functionality but faced with impossibility to distinguish file of directory.

In HTTP world, there is no real directory concept. There are only documents. It happens that some webservers, if configured so could display a directory content if the default document is missing. That directory content is a HTML page built automatically by the webserver.

Then I noticed that requests to folder without trailing slash (GET /somepath/foo/bar) are redirected to locations with slash (/somepath/foo/bar/) so it's easy to tell it's a directory.

This is not always the case. Here again, it happens that either the web designer of the webserver by itself redirect the client to the location ending with a slash when one is missing.

I'm far not close to HTTP specs and don't know whether it's obligatory behavior and could I rely on it.

I would not rely on that behaviour.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to