Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I have a problem with my perl script continuously pushing data to the web client running Firefox. The problem is that the client intermittently lost connection to the server. After I installed a network analyser software (Ethereal) on the Apache server, I found out that the client is sending a http [RST, ACK] to the server for some reason. Does anyone have any clue what all this mean? Please help.

Thanks.

104.410295 SERVER -> CLIENT TCP [TCP segment of a reassembled PDU] 104.410672 CLIENT -> SERVER TCP 40656 > http [ACK] Seq=658 Ack=244960 +Win=64088 Len=0 TSV=2246027006 TSER=1157285862 104.411860 SERVER -> CLIENT TCP [TCP segment of a reassembled PDU] 104.412172 CLIENT -> SERVER TCP 40656 > http [ACK] Seq=658 Ack=246073 +Win=64088 Len=0 TSV=2246027008 TSER=1157285864 104.418199 CLIENT -> SERVER TCP 40656 > http [RST, ACK] Seq=658 Ack=24 +6073 Win=64088 Len=0 TSV=2246027014 TSER=1157285864

<PRE> tags removed, <p> and <code> tags added by GrandFather to improve readability

Replies are listed 'Best First'.
Re: Help With Ethereal Result
by misc (Friar) on Aug 29, 2007 at 09:46 UTC
    I haven't fiddled around with server push yet.
    However, http://ajaxpatterns.org/HTTP_Streaming might be useful to you.

    I'd guess firefox simply fed up waiting for the finish of the response.
    Perhaps you should add something like body.onload="window.location.reload()";

    As far as I know you can't rely on a persistent connection.
    Besides the IE, who will break the connection in each case, the client could loose the internet connection for example.

    I'm however very interested in http streaming, could you perhaps msg me how you solved the problem ?
    michael
      The problem is when the Apache server received the RST command, it killed the running PERL script as well. How do I prevent Firefox from sending out this RST command though?
        There's no easy way to establish a new connection between firefox and the running script AFAIK.

        I also don't believe it would be possible/wise trying to change the behaviour of firefox,
        although you could write your own webbrowser for the client's side...

        I think you'll need something like session cookies and persistent session data storage.

        What exactly are you trying to do ?
Re: Help With Ethereal Result
by Anonymous Monk on Aug 29, 2007 at 03:20 UTC