如何判断这中   URL     http://www.baidu.com/baidu.rar     是不是有效   
下面这个函数   是我写的     如果参数是     http://www.baidu.com   这个函数有效   但是参数是http://www.baidu.com/baidu.rar的时候这个函数   就没了效果谁能告诉我应该怎么改     
function   Get(URL:   string):   boolean; 
  var 
    IDHTTP:   TIDHttp; 
    ss:   String; 
  begin 
    Result:=   False; 
    IDHTTP:=   TIDHTTP.Create(nil); 
    try 
        try 
              idhttp.HandleRedirects:=   true;       //必须支持重定向否则可能出错9C   ?$M   G7Z   y   {0K   M   o 
            idhttp.ReadTimeout:=   30000;             //超过这个时间则不再访问 
              ss:=   IDHTTP.Get(URL); 
              if   IDHTTP.ResponseCode=200   then 
                Result   :=true; 
        except 
        end; 
    finally 
        IDHTTP.Free; 
    end; 
  end; 
  
function   Get(URL:   string):   boolean; 
  var 
    IDHTTP:   TIDHttp; 
    ss:   String; 
  begin 
    Result:=   False; 
    IDHTTP:=   TIDHTTP.Create(nil); 
    try 
        try 
              idhttp.HandleRedirects:=   true;       //必须支持重定向否则可能出错9C   ?$M   G7Z   y   {0K   M   o 
            idhttp.ReadTimeout:=   30000;             //超过这个时间则不再访问 
              ss:=   IDHTTP.Get(URL); 
              if   IDHTTP.ResponseCode=200   then 
                Result   :=true; 
        except 
        end; 
    finally 
        IDHTTP.Free; 
    end; 
  end;