- From: Yue Dong <ydong@andrew.cmu.edu>
- Date: Sun, 13 Dec 1998 14:43:48 -0500 (EST)
- To: Henrik Frystyk Nielsen <frystyk@w3.org>
- cc: www-lib@w3.org
Henrik, I think you misunderstand my requirement. Let me clarify it. Suppose we have two servers: Server1.mycompany.com And Server2.mycompany.com Clients always contract Server1 for authentication. After checking the clients is valid users, the Serve1 will *Redirect* to Server2 AND pass another system password to Server2. In server1, Two actions needed to do: 1)First redirect to targeted server (change current url) 2)pass Post data If we just use HTML, we could define a form on Server1: <Form Method="POST" Action=http://Server2.mycompany.com/cgi-bin/getpassword> <BR>User ID: <Input TYPE="text" NAME="User"> <BR>assword: <INPUT TYPE="password" NAME="Password"> <INPUT TYPE="hidden" name="systempasswd" value="1234"> </Form> OR: <Form Method="POST" Action=http://Server2.mycompany.com/cgi-bin/getpassword?systempasswd="1234"> <BR>User ID: <Input TYPE="text" NAME="User"> <BR>assword: <INPUT TYPE="password" NAME="Password"> </Form> In these two ways, the *systempassword* will be exposed to everyone. Thus, we are thinking using postform.c in libwwww. we define another simple C program *Server2.c* as follows (locate in cgi-bin of Server1): sprintf(com, "postform =http://Server2.mycompany.com/cgi-bin/getpassword 'systempasswd=1234'"); system(com); And change the form in Server1 as follows: <Form Method="POST" Action=http://Server1.mycompany.com/cgi-bin/Server2> <BR>User ID: <Input TYPE="text" NAME="User"> <BR>assword: <INPUT TYPE="password" NAME="Password"> </Form> The result is: we could get reponse from Server2, but the current is unfortunately in Server1 (we wish in Server2). What we expect is to let clients to directly contract the Server2 not through Server1, at this moment. --Yue On Sun, 13 Dec 1998, Henrik Frystyk Nielsen wrote: > At 15:03 12/12/1998 -0500, Yue Dong wrote: > > > >I tried postform.c. What postform does is to reponse the POST request, and > >send back the content. BUT, it did NOT redirect to new URL -- it still > >stay on OLD URL. > > It works for me - when I use the postform program to post to a URI and I > get a redirection back (302, for example), libwww asks me whether I want to > continue with the new location. If so then it posts to the redirected address. > > What of this doesn't work for you? > > Henrik > -- > Henrik Frystyk Nielsen, > World Wide Web Consortium > http://www.w3.org/People/Frystyk >
Received on Sunday, 13 December 1998 14:43:50 UTC