Delphi XE:idHttp& Request.Range,一个bug? [英] Delphi XE: idHttp & Request.Range, a bug?
问题描述
Request.Range
idHttp
,但我不能这样做。德尔福不允许我在设计时和运行时都不做。 例如。我在设计时设置了'6000 - '
。一个属性一直都是空的。
在线程中):
Downloader.Request.Range:=(IntToStr(DFileStream.Position)+' - ');
同步(procedure begin showmessage(Downloader.Request.Range)end);
showmessage(Downloader.Request.Range)
我没有显示(空字符串)。
我在HTTPAnalyzer中检查过请求 - >我的程序不发送范围。
在Delphi 2010中检查此行为 - 全部正常。我在设计/实时设置了一个范围。这两种情况都是可以的。
有人有想法吗?
这是一个bug还是什么
谢谢!
范围
属性已被弃用,而您必须使用范围
属性。
检查此样本
使用
IdHTTPHeaderInfo;
var
范围:TIdEntityRange;
begin
范围:= FHttp.Request.Ranges.Add;
Range.StartPos:= FRangeFrom;
Range.EndPos:= FRangeTo;
FHttp.Get(FURL,FileStream);
结束
I have Delphi XE. I try to set Request.Range
of idHttp
but I cannot do this. Delphi doesn't allow me to do this neither at design time nor at run time.
E.g. I set '6000-'
in a design time -> a property gets empty all time.
I do (in a thread):
Downloader.Request.Range:=(IntToStr(DFileStream.Position) + '-');
synchronize(procedure begin showmessage(Downloader.Request.Range) end);
showmessage(Downloader.Request.Range)
shows me nothing (an empty string).
I checked a request in HTTPAnalyzer -> my program doesn't send a range.
A checked this behavior in Delphi 2010 - all is normal. I set a range in a design/real time. A result is fine in the both cases.
Does anybody have ideas?
Is this a bug or what?
Thanks!
The Range
property is deprecated instead you must use the the Ranges
property.
Check this sample
uses
IdHTTPHeaderInfo;
var
Range: TIdEntityRange;
begin
Range := FHttp.Request.Ranges.Add;
Range.StartPos := FRangeFrom;
Range.EndPos := FRangeTo;
FHttp.Get(FURL, FileStream);
end;
这篇关于Delphi XE:idHttp& Request.Range,一个bug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!