bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gawk 3.1.6 bug in /inet/tcp/lport/0/0


From: Jürgen Kahrs
Subject: Re: gawk 3.1.6 bug in /inet/tcp/lport/0/0
Date: Fri, 16 Nov 2007 20:56:25 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20070801)

Aharon Robbins schrieb:

> Greetings. Re the below. I don't get any such message under Linux.
> Please talk to the cygwin people directly. I have bcc'ed the Cygwin
> contact for gawk, so I hope she will be in touch w/you directly.

You're right 3.1.6 on Linux executes the script correctly,
while 3.1.6 on Cygwin terminates with an error message.
3.1.5 on both platforms works correctly.

>> while ("awk" != "complex") { 
>> print "HTTP/1.0 200 OK" |& HttpService 
>> print "Content-Length: " Len ORS |& HttpService 
>> print Hello |& HttpService 
>> while ((HttpService |& getline) > 0) 
>> continue; 
>> close(HttpService) 
>> } 
>> } 
>> ' 

One more hint: When implementing simple HTTP services
these days with gawk, I avoid the while loop that
swallows the incoming HTTP header and close the
connection immediately after having replied to the client.
This is necessary because most browsers (IE, lynx, w3m)
will cause the gawk server to hang after the first connection.
Only Mozilla-descendents like the Firefox and SeaMonkey
browsers behave nicely and will not cause the gawk server to hang.

Maybe I should have updated the doc earlier so that users
wouldnt run into this. But remember: This is _not_ the
cause of the problem that was reported by the OP. This is
just a hint.




reply via email to

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