rejetto forum
Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: Mars on May 18, 2009, 12:01:51 AM
-
result:=getTill('?', s); give a bug by duplicate the path into the url after the ?
the old line result:=chop('?', s); is the best solution
procedure getUri();
var
i, j: integer;
vars: Tstrings;
s: string;
begin
if not satisfied(md.cd) then exit;
result:=md.cd.conn.request.url;
if pars.count < 2 then exit;
s:=result;
// result:=getTill('?', s); //old by rejetto
result:=chop('?', s); //restored by mars
vars:=TstringList.create();
try
vars.delimiter:='&';
vars.quoteChar:=#0;
vars.delimitedText:=s;
if pars.count > 1 then
le problème à été constaté sur le serveur de silentpliz en utilisant le petit template suivant
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script language="JavaScript" type="text/JavaScript">
function Prefresh() {
window.location="{.get|url|text=.}";
};
</script>
</head>
<body>
<button onclick="Prefresh()">click here</button>
</body>
</html>
vraiment pas cool :-[
-
i don't understand from the html example.
can you tell me an example URL where the result is bad?
-
Starts the template provided by mars > click several times on the button > watch the address bar of your browser ...
the result is: :o
eg:
http://localhost:44300/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/?/1_Envois%20de%20Fichiers/&text= ....
Normally the result should be:
1 click = http://localhost:44300/1_Envois%20de%20Fichiers/?text=
1 click = http://localhost:44300/1_Envois%20de%20Fichiers/
1 click = http://localhost:44300/1_Envois%20de%20Fichiers/?text=
1 click = http://localhost:44300/1_Envois%20de%20Fichiers/
etc... etc...
-
ok, sorry for it :)