0 Members and 1 Guest are viewing this topic.
procedure load(fn:string; varname:string=''); begin if ansiStartsText('http://', fn) or ansiStartsText('https://', p) then result:=httpGet(fn) else result:=loadFile(uri2diskMaybe(fn));.......if name = 'filesize' then begin if ansiStartsText('http://', p) or ansiStartsText('https://', p) then i:=httpFileSize(p) else i:=sizeOfFile(uri2diskMaybe(p)); result:=intToStr(max(0,i)); end;
it makes sense only if httpget and httpfilesize work over https.do they?
if name = 'load' then load(par(0), par(1,'var')); procedure load(fn:string; varname:string=''); begin if reMatch(p, '^https?://', 'i!') > 0 then result:=httpGet(fn) else result:=loadFile(uri2diskMaybe(fn));if anyCharIn('/\',fn) then result:=macroQuote(result);
if name = 'load' then load(p, par(1,'var')); procedure load(fn:string; varname:string=''); begin if reMatch(fn, '^https?://', 'i!') > 0 then result:=httpGet(fn) else result:=loadFile(uri2diskMaybe(fn));if anyCharIn('/\',fn) then result:=macroQuote(result);
if name = 'load' then load(par(1,'var')); procedure load(varname:string=''); begin if reMatch(p, '^https?://', 'i!') > 0 then result:=httpGet(p) else result:=loadFile(uri2diskMaybe(p));if anyCharIn('/\',p) then result:=macroQuote(result);