Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

actuall name of url (index.htm, default.asp)

0 views
Skip to first unread message

Saeed

unread,
Aug 30, 2002, 3:41:09 AM8/30/02
to

Hello All.
I want to get actaul name of url.
example:
http://www.w3schools.com/
is
http://www.w3scholls.com/default.asp
but I can not get it.
for some sites I get Using ""Indy""
IdHTTP.Response.ExtraHeaders.Values['Content-Location']

How can do it?
Thank you.

Stephane Grobety

unread,
Aug 30, 2002, 4:57:18 AM8/30/02
to
I'm sorry, but this is not possible. You aren't acessing a file but a
ressource and only the server can know how this ressource is genetated
(whter is is rom a static file, a database methode, a remote system, a
dynamic page, etc.).

This also counts for the directory default.

Good luck,
Stephane

Markku Uttula

unread,
Aug 30, 2002, 5:15:44 AM8/30/02
to
Saeed wrote:
> I want to get actaul name of url.
> example:
> http://www.w3schools.com/
> is
> http://www.w3scholls.com/default.asp
> but I can not get it.
> for some sites I get Using ""Indy""
> IdHTTP.Response.ExtraHeaders.Values['Content-Location']

Simple answer: You can't

More complex answer: This is dependent on the server configuration. When
you require a directory (URL ending with "/") the web server shows
whatever it is configured to return. It could be a html-file, the
contents of the requested directory, error message or whatever. There is
definetly _no_way_ of telling what is coming unless you've explicitly
stated what document you want (and you have the rights to get that
document (and a couple of other things)).

--
Markku Uttula

URL: http://www.disconova.com/utu/ "Are you hot? Or at least cute?"
MAIL: markku...@disconova.com "If not, are you at least easy?"


Saeed

unread,
Aug 31, 2002, 11:53:55 PM8/31/02
to

Thanks.

>I'm sorry, but this is not possible
I writing an application that searches web like crawlers and this makes problem for me. also urls that have "=","?",...
make verifying hard.
Thanks a lot.


Stephane Grobety

unread,
Sep 2, 2002, 3:53:34 AM9/2/02
to
You don't really need the "real" document name for that, the URL should be
enough.

Good luck,
Stephane

0 new messages