On 11 Jul 2006, at 00:21, Aparajita Fishman wrote:

303 is returned by the Active4D redirect command, but it could be coming from 4D. You should capture the http stream to see what response text is sent with it, then I could determine the source.

I copied my 'index.a4d' page to the Active 4D demo folder to try to isolate the problem. The Active 4D demo works perfectly under 4D Client but when I replace the 'index.a4d' with my own ('problem') one, 'A4D Execute 4D request' still returns a status 303.

Here are the details:

My 'index.a4d' code (The URL is not static as would appear here - it's returned by a function, I've just made the function result static here for simplicity and removed the function call. I was testing it on a machine address 192.168.0.50). The target page for the redirect lives 1 level down from the html root, i.e. in 'web/comms/srv.a4d'.

`*********************** CODE SNIPPET: 'index/a4d' *****************

<%
`     index.a4d:
`     Site default page

C_TEXT($P_SVR_URL)
        
$P_SVR_URL:="http://192.168.0.50/comms/srv.a4d? f_pg='home.htm'&f_Cardinal='1'"
        redirect($P_SVR_URL)
        
%>

`*********************** END CODE SNIPPET `**********************************

Here is the response from 'A4D Execute 4D request':


`*********************** CODE SNIPPET: 'A4D Response' (Status 303) *****************

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<head>
<title>Redirect</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="all">
body {
   font-family: Verdana, Helvetica, Arial, sans-serif;
   font-size: 12px;
}
</style>
</head>
<body>
<p>Your browser could not fulfill a redirect request. Please click <a href="http://192.168.0.50/comms/srv.a4d? f_pg='home.htm'&f_Cardinal='1'">here</a> to go the intended destination.</p>
</body>
</html>

`*********************** END CODE SNIPPET `**********************************

Although the html code of the response contains the correct redirect address, the browser actually re-directs to the home page plus the query parameters, i.e. 'http://192.168.0.50/? f_pg='home.htm'&f_Cardinal='1' and I'm completely bamboozled as to why. This starts the cycle again and usually ands up in a 'too many re-directs' error.

Everything works perfect in 4D Single, both Windows and Mac - I only get this problem on 4D Client (which will be the production platform).

Setup:

Windows XP (Both Client and Server)
4D Client 2004 Windows (Client is web server)
Passwords off in Advanced Web Preferences
(Logged on as default web user despite this)
Active 4D Version 4.0.2.31
Site running under Active 4D Demo Source with $ioClientIsWebServer=True in A4D_InitHook
Site root is in 4D Client folder

Regards

Peter


_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to