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 var
ServiceName,ContentType : string; ServiceName,ContentType : string;
rqst : IRequestBuffer; rqst : IRequestBuffer;
inStream, outStream: TStringStream; inStream : TStringStream;
outStream : TMemoryStream;
B : Boolean; B : Boolean;
begin begin
{$ifdef wmdebug}SendDebug('Entering ProcessServiceRequest');{$endif} {$ifdef wmdebug}SendDebug('Entering ProcessServiceRequest');{$endif}
@@ -215,7 +216,7 @@ begin
begin begin
inStream := TStringStream.Create(ARequest.Content); inStream := TStringStream.Create(ARequest.Content);
try try
outStream := TStringStream.Create(''); outStream := TMemoryStream.Create();
try try
ContentType:= ARequest.ContentType; ContentType:= ARequest.ContentType;
Response.ContentType := ContentType; Response.ContentType := ContentType;
@@ -224,7 +225,9 @@ begin
{$ifdef wmdebug}SendDebug('Handling request');{$endif} {$ifdef wmdebug}SendDebug('Handling request');{$endif}
HandleServiceRequest(rqst); HandleServiceRequest(rqst);
{$ifdef wmdebug}SendDebug('Handled request');{$endif} {$ifdef wmdebug}SendDebug('Handled request');{$endif}
AResponse.Content:=OutStream.DataString; AResponse.ContentStream := outStream;
AResponse.SendContent();
AResponse.ContentStream := nil;
finally finally
OutStream.Free; OutStream.Free;
end; end;
@@ -278,5 +281,4 @@ begin
end; end;
end. end.