From 9ce86062fb68b2501e5560d16b3e2b15d6bdf4ef Mon Sep 17 00:00:00 2001 From: inoussa Date: Fri, 26 Aug 2011 15:10:43 +0000 Subject: [PATCH] Use "AResponse.ContentStream" instead of "AResponse.Content" because the later does interpret #13 as new and so replaced with #10. This is needed for binary format. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1836 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- wst/trunk/ide/lazarus/wstmodule/wstmodule.pas | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wst/trunk/ide/lazarus/wstmodule/wstmodule.pas b/wst/trunk/ide/lazarus/wstmodule/wstmodule.pas index 7432dde17..ebf62d01e 100644 --- a/wst/trunk/ide/lazarus/wstmodule/wstmodule.pas +++ b/wst/trunk/ide/lazarus/wstmodule/wstmodule.pas @@ -202,7 +202,8 @@ Procedure TCustomWSTModule.ProcessServiceRequest(ARequest : TRequest; AResponse var ServiceName,ContentType : string; rqst : IRequestBuffer; - inStream, outStream: TStringStream; + inStream : TStringStream; + outStream : TMemoryStream; B : Boolean; begin {$ifdef wmdebug}SendDebug('Entering ProcessServiceRequest');{$endif} @@ -215,7 +216,7 @@ begin begin inStream := TStringStream.Create(ARequest.Content); try - outStream := TStringStream.Create(''); + outStream := TMemoryStream.Create(); try ContentType:= ARequest.ContentType; Response.ContentType := ContentType; @@ -224,7 +225,9 @@ begin {$ifdef wmdebug}SendDebug('Handling request');{$endif} HandleServiceRequest(rqst); {$ifdef wmdebug}SendDebug('Handled request');{$endif} - AResponse.Content:=OutStream.DataString; + AResponse.ContentStream := outStream; + AResponse.SendContent(); + AResponse.ContentStream := nil; finally OutStream.Free; end; @@ -278,5 +281,4 @@ begin end; -end. - +end. \ No newline at end of file