SWAT wish list

Simon Hyde shyde at poboxes.com
Tue Mar 17 17:44:34 GMT 1998

On Tue, 17 Mar 1998 23:44:32 +1100, you wrote:

>> couldn't you just bung the following in the page somewhere?
>> <META NAME="moved"
>> CONTENT="delay_in_seconds;URL=http://samba.anu.edu.au:901/status"
>> HTTP-EQUIV="Refresh">
>I've just implemented this (as I described in the last email) and I
>found a problem. When the page refreshes it reloads all elements,
>rather than just going to the new page. This means it reloads the 6
>images we well as the main page.
>With a refresh time of 10 seconds these 42 hits per minute were enough
>to trigger the automatic denial of service preventer in inetd and it
>shut down swat. Nasty!
>So, does someone know a varient of the above incantation that causes
>browsers to just load the specified page without flushing all elements
>from the current page from their cache? I'm using Netscape 4.04 if it
>Maybe we'll need that javascript stuff after all :-(

How about some server side pushing, using something similare to the
following simple NPH CGI program written in Perl:

#!/usr/local/bin/perl -w
$| = 1; #set STDOUT to be unbuffered
binmode(STDOUT); #for windows platforms to stop adding of \r
my $boundary = '-----my-boundary-example-'.rand.'-----';
print "HTTP/1.0 200 OK\r
Status: 200 OK\r
Server: Server-Side Push Demo\r
Content-type: multipart/x-mixed-replace; boundary=$boundary\r\n\r\n";
    my $time = `/bin/date`;
    print "$boundary\r\n";
    print "Content-type: text/html\r\n\r\n";
    print "<HTML><HEAD><TITLE>Server-Side Push Example</TITLE></HEAD>\n";
    print "<BODY><CENTER><H1>Server-Side Push Example</H1></CENTER>\n";
    print "<H4>The time is: $time</H4>\n";
    print "</BODY></HTML>\r\n";

Simon Hyde

More information about the samba-technical mailing list