lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV Lynx Question


From: Ronald Mowery
Subject: LYNX-DEV Lynx Question
Date: Mon, 28 Oct 1996 17:31:11 -0500

I am a systems engineer for Silicon Graphics Inc.  I assist several of my
customers in writing html pages and cgi scripts.  Some of these customers
like to view their pages on multiple html browsers, including lynx, so that
they can check what their customers see.  I have version 2.6 of lynx on my
machine for this reason.

The following html form is a simple, but typical example of customer access
to their pages.

<HTML>
<BODY>
<H3>Type your User Name and Password below followed by
Submit. </H3>
<FORM METHOD="POST" ACTION="/cgi-bin/authorize.cgi">
<BR>
<H3>User Name: <INPUT TYPE="TEXT" NAME="user"
 SIZE="8"></H3>
<BR>
<H3>Password: <INPUT TYPE="PASSWORD" NAME="password"
 SIZE="8"></H3>
<BR>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Submit">
<INPUT TYPE="RESET" NAME="reset">
</FORM>
</BODY>
</HTML>

The following cgi script processes the input from the html form.

#!/bin/sh

USE="student"
PASS="access"
URL="http://angler.nova.sgi.com:/rmowery/index.html";

read string

string=`echo $string | tr "&" " "`
set $string

user=`echo $1 | nawk -F= '{print $2}'`
password=`echo $2 | nawk -F= '{print $2}'`

if [ "$user" = $USE -a "$password" = $PASS ]
then
        echo "Location: $URL"
        echo
else
        echo Content-type: text/html
        echo
        echo "<CENTER><H2>Invalid User Name or Password!"
        echo "</H2></CENTER>"
        echo "<CENTER><H2>Please Try Again."
        echo "</H2></CENTER>"
        echo "<CENTER><H2><A HREF="${HTTP_REFERER}">Return to previous
page.</A>
"
        echo "</H2></CENTER>"

When I run this script on input from the html document, I get the following
error message:  "Alert!: HTTP/1.0 500 Server Error".

I then get the following page:

                                 Server Error

   This server has encountered an internal error which prevents it from
   fulfilling your request. The most likely cause is a misconfiguration.
   Please ask the administrator to look for messages in the server's
   error log.

All the other browsers I have tested send me to the page that follows a
correct username password combination.

If I type an incorrect password, I get the notifier page that the cgi script
specifies, but the correct user and password will not follow the "Location:"
statement in the cgi script.

Any ideas if this should work or if I need to compile anything else to make
it fly?

Thanks for your time!

Ron Mowery

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]