我需要这段代码的帮助
这是所有代码
请求:TIdHTTPRequestInfo
响应:TIdHTTPResponseInfo
jQuery:TResourceStream
procedure TServer.ActiveServer;
begin
DefaultPort := 8117;
Active := True;
OnCommandGet := FServerCommandGet;
JQuery := TResourceStream.Create(HInstance,'JQuery',RT_RCDATA);
end;
function TServer.FindFiles: Boolean;
var
Stream : TStream;
begin
if Request.Document = '/jquery.js' then
begin
Response.ContentType := 'application/x-javascript';
Stream := TStream.Create;
Stream.Position := 0;
Stream.CopyFrom(JQuery,JQuery.Size);
Response.ContentStream := Stream;
Result := True;
end else
Result := False;
end;
错误:TStream.Seek 未实现
问题出在 TStream 中的复制 TResourceStream