You've already forked lazarus-ccr
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:
@ -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.
|
Reference in New Issue
Block a user