lynx-dev
[Top][All Lists]
Advanced

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

Re: [Lynx-dev] Bug: CGI, POST-data


From: Thomas Dickey
Subject: Re: [Lynx-dev] Bug: CGI, POST-data
Date: Thu, 24 Apr 2008 21:06:57 -0400
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Thu, Apr 24, 2008 at 12:45:11PM +0200, Andreas K. Foerster wrote:
> Hello,
> 
> I'm using Lynx version 2.8.6rel.4 on a GNU/Linux system and an apache 1.3 
> server.
> 
> Currently I'm writing a CGI program, which I tried to test with Lynx.
> Lynx showed a very surprising behaviour, which I think is a bug.

that could be - I didn't write that part, and it's been untouched for a
long while.
 
> My CGI program uses the POST method to transfer data. When there is no 
> data, ie. it is called from a normal link, the startpage should appear.
> 
> This works as expected, when I use a link from outside of the CGI 
> program.
> 
> Then I wanted to put links to the startpage into the generated pages, like 
> this: printf ("<p><a href='%s'>Start</a></p>", getenv ("SCRIPT_NAME"));
> 
> This works fine with other browsers, but not with Lynx.

I'm puzzled at this point, not sure I've got the question right.

As I read the printf, that's in your cgi script, sending back
text to lynx.  But when I run a testcase for POST, I'm seeing
the parameters in the content section rather than the url, e.g.
(from a "lynx -trace"):

POST /cgi-bin/testcase HTTP/1.0\r
Host: localhost\r
Accept: text/html, text/plain, text/css, text/sgml, */*;q=0.01\r
Accept-Encoding: gzip, deflate, compress, bzip2\r
Accept-Language: en\r
Pragma: no-cache\r
Cache-Control: no-cache\r
User-Agent: Lynx/2.8.7dev.4 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.8c\r
Content-type: application/x-www-form-urlencoded\r
Content-length: 23\r
\r
First=firstp&Last=lastp
----------------------------------

Then, if I add a link in the generated page, activating that link
uses a GET - for my testcase.  Perhaps your generated page is a form
(also using POST).  If I can see what the whole picture looks like,
then I can respond better.

thanks

> The generated page was called with POST-data. The link was supposed to 
> be called with no data at all.
> But Lynx sends the same POST-data again!?
> 
> Workaround: give it some GET-data:
> printf ("<p><a href='%s?a=start'>Start</a></p>", getenv ("SCRIPT_NAME"));
> 
> 
> P.S.: I'm not subscribed to this list.
> 
> -- 
> AKFoerster



> _______________________________________________
> Lynx-dev mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lynx-dev


-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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