Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Sep : Re: id http missing redirect?
| Subject: | Re: id http missing redirect? |
| Posted by: | "dk_sz" (dk_..@hotmail.com) |
| Date: | Tue, 11 Sep 2007 20:16:59 |
> 1) server-side, which use the 3xx range of response codes (except for 304)
> and sends a "Location" reply header to specify where the redirect is
> going.
Right now, I am testing on file:
http://www.micro-sys.dk/sitemap.txt
But depending on circumstances the given TidHTTP
makes requests (i.e. the order or... I do not know yet)
the problem can occur with other files too.
It is a pure Apache permanent redirect.
Redirect permanent /sitemap.txt http://www.micro-sys.dk/urllist.txt
> Then a server-side redirect is not actually occuring. There are two types
Well, I followed the problem to this call stack (last = top) :
TidIOHandler.RaiseConnClosedGracefully
TidIOHandlerStack.CheckForDisconnect(True,True)
TidIOHandler.WriteDirect(bytes...)
TidIOHandlerStack.WriteDirect(bytes...)
TidIOHandler.WriteBufferFlush(-1)
TidIOHandler.WriteBufferFlush
TidIOHandler.WriteBufferClose
TidCustomHTTP.BuildAndSendRequest
TidCustomHTTP.ConnectToHost
TidCustomHTTP.DoRequest('HEAD'.'http://www.micro-sys.dk/sitemap.txt,nil,...)
TidCustomHTTP.HEAD('http://www.micro-sys.dk/sitemap.txt')
...
FHTTP.Request.Connection := 'close';
FHTTP.Head(AURI);
So... If I understand that correctly, my server
closed connection before any response received.
> Then I suggest you use a packet sniffer to look at the actual
Thanks for the suggestion. Etheral might help I suppose.
I check for connected (and disconnect if true) before and
after each request... But is there anything else I can do? If
it is related to some bug in communication between server
and client, it would be nice it everything could be "reset"?
best regards
Thomas Schulz