Re: Indy 10: HTTP Server - onCommandGet - Serving dynamic images

Giganews Newsgroups
Subject: Re: Indy 10: HTTP Server - onCommandGet - Serving dynamic images
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Wed, 4 Jul 2007

"Matthew Augier (dps)" <Matth…@dps.uk.com> wrote in message
news:FBBC1E2B7E2CE340Matth…@dps.uk.com...

> This works fine the first time, but then on a refresh I get
> nothing but a little X in place of my graphic?

By default, TIdHTTPServer frees the ContentStream after the response
has been sent.  So you are likely destroying your fTempStream1 object,
and thus it is no longer valid on subsequent requests, throwing an
exception that causes TIdHTTPServer to send an error reply back to the
web browser.  To avoid that, you need to set the response's
FreeContentStream property to False instead.

Gambit

Replies

In response to

Indy 10: HTTP Server - onCommandGet - Serving dynamic images posted by Matthew Augier (dps) on Wed, 4 Jul 2007