Thanks in advance, WimB.
example, in serverCommandGet:
TMemoryStream* MemoryStream = new TMemoryStream();
MemoryStream->LoadFromFile(....->LocalDoc);
HttpRequest->ResponseInfo->FreeContentStream = true;
HttpRequest->ResponseInfo->ResponseNo = 200;
HttpRequest->ResponseInfo->ContentType = ContentType;
HttpRequest->ResponseInfo->ContentLength = (int)MemoryStream-
>Size;
HttpRequest->ResponseInfo->ContentStream = MemoryStream;
HttpRequest->ResponseInfo->WriteContent;
works fine, and:
TStringList* StringList = new TStringList();
StringList->LoadFromFile(HttpRequest->LocalDoc);
HttpRequest->Content = StringList->Text;
delete StringList;
AnsiString ContentText = ReplaceDivaTags(HttpRequest);
HttpRequest->ResponseInfo->ResponseNo = 200;
HttpRequest->ResponseInfo->ContentType = ContentType;
HttpRequest->ResponseInfo->ContentText = ContentText;
HttpRequest->ResponseInfo->ContentLength = ContentText.Length();
also works fine.