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
This commit is contained in:
inoussa
2011-08-26 15:10:43 +00:00
parent 5e63f131fd
commit 9ce86062fb

View File

@@ -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;
@@ -279,4 +282,3 @@ end;
end.