读书人

idhttp如何完全断开连接?为什么要关掉

发布时间: 2012-02-10 21:27:41 作者: rapoo

idhttp怎么完全断开连接??为什么要关掉应用程序才释放session?

Delphi(Pascal) code
    FIdHttp := TIdHttp.create;    FIdHttp.Request.Clear;    FIdHttp.Request.CacheControl := 'no-cache';    FIdHttp.Request.Connection := 'close';    FIdHttp.Request.ContentType := 'application/x-www-form-urlencoded';    FidHttp.Request.ContentLength := 0;    Params := TStringList.Create;    FQQFinderRes := FIdHttp.Post(FSearchUrl, Params);    FIdHttp.Disconnect;    FIdHttp.Free;

FSearchUrl 是 php, 同一session只能连10次。
上面的代码应该可以无限连接才对。
可是实际上要关掉程序再运行才能再连接。就是说FIdHttp没释放还是同一应用程序会有共享的session??


[解决办法]
session是存在于一个进程内的。
[解决办法]
有木有其他的属性实在Spector里面设置的?

读书人网 >.NET

热点推荐