Re: HTTP Get, connection closed gracefully problem with Indy10

Giganews Newsgroups
Subject: Re: HTTP Get, connection closed gracefully problem with Indy10
Posted by:  Remy Lebeau \(TeamB\) (no.spam@no.spam.com)
Date: Wed, 23 Jul 2008

"Chris Ueberall" <CUebera…@web.de> wrote in message
news:58C3A74D715CE340CUebera…@web.de...

>    idHTTPClient.Request.Host      := '192.168.178.30';
>    idHTTPClient.Request.URL        :=
> '/cgi/jpg/image.cgi?resolution=1280x1024';

You should not be doing that, in either version.  Use the URL that is pssed
to Get() only.  TIdHTTP parses everything it needs from that.

> An EIdConnClosedGracefully will be raised when I call it the
> second time. Disconnecting doesn't disconnect, IOHandler.Disconnect
> has no effect. Connect fails because already connected. Creating the
> TidHTTP class for every call works. Why?

The InputBuffer is likely not empty when Get() exits, so TIdHTTP does not
have the oppurtunity to detect the disconnect the first time around.

Gambit

Replies

None

In response to

HTTP Get, connection closed gracefully problem with Indy10 posted by Chris Ueberall on Tue, 22 Jul 2008