delphi – TIdHTTPServer是否兼容Microsoft BITS
我们正在尝试使用TIdHTTPServer组件为我们的软件编写更新服务器.目前,我们正在提供一个列出可用更新及其文件版本等的
XML文件.当客户端程序找到更新版本时,应使用BITS开始下载.
现在这是我们遇到的问题,我们的程序正在请求XML文件,并且看到有可用的更新.然后它创建一个BITS作业下载它,然而BITS保持报告下载失败.我们可以使用相同的URL和IE / Firefox / Chrome下载文件. 所以我的问题: TIdHTTPServer是否兼容BITS? 我问这个是因为我已经发现有这些下载要求的位工作.
解决方法
刚刚发现一个错误,在使用范围请求时,阻止传输2.1GB以上的文件.
这里是 IdHTTPHeaderInfo.pas aprox行770 procedure TIdEntityRange.SetText(const AValue: String); var LValue,S: String; begin LValue := Trim(AValue); if LValue <> '' then begin S := Fetch(LValue,'-'); {do not localize} if S <> '' then begin FStartPos := StrToIntDef(S,-1); FEndPos := StrToIntDef(Fetch(LValue),-1); FSuffixLength := -1; end else begin FStartPos := -1; FEndPos := -1; FSuffixLength := StrToIntDef(Fetch(LValue),-1); end; end else begin FStartPos := -1; FEndPos := -1; FSuffixLength := -1; end; end; 这应该是 procedure TIdEntityRange.SetText(const AValue: String); var LValue,'-'); {do not localize} if S <> '' then begin FStartPos := StrToInt64Def(S,-1); FEndPos := StrToInt64Def(Fetch(LValue),-1); FSuffixLength := -1; end else begin FStartPos := -1; FEndPos := -1; FSuffixLength := StrToInt64Def(Fetch(LValue),-1); end; end else begin FStartPos := -1; FEndPos := -1; FSuffixLength := -1; end; end; 一个Remy修复 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |