TIdURI.GetFullURI miss '?' before Params!! is it bug?

Giganews Newsgroups
Subject: TIdURI.GetFullURI miss '?' before Params!! is it bug?
Posted by:  Byungho (bast…@bastad.pe.kr)
Date: Fri, 12 Aug 2005

My indy version is 10.0.52!!

GetFullURI does not check empty value for FPath, FDocument and FParams!!
and missing '?' before FParams!! is it bug?

function TIdURI.GetFullURI(
const AOptionalFields: TIdURIOptionalFieldsSet): String;
Var
  LURI: String;
begin
  if FProtocol = '' then begin
    raise EIdURIException.Create(RSURINoProto);
  end;

  LURI := FProtocol + '://';    {Do not Localize}
  if (FUserName <> '') and (ofAuthInfo in AOptionalFields) then begin
    LURI := LURI + FUserName;
    if FPassword <> '' then begin
      LURI := LURI + ':' + FPassword;    {Do not Localize}
    end;
    LURI := LURI + '@';    {Do not Localize}
  end;

  if FHost = '' then begin
    raise EIdURIException.Create(RSURINoHost);
  end;
  LURI := LURI + FHost;
  if (FPort <> '') and (FPort <> '80') then begin
    LURI := LURI + ':' + FPort;    {Do not Localize}
  end;
  LURI := LURI + FPath + FDocument + FParams; //<<===== herererere...
  if (FBookmark <> '') and (ofBookmark in AOptionalFields) then begin
    LURI := LURI + '#' + FBookmark;    {Do not Localize}
  end;
  Result := LURI;
end;

Replies