?
Solved

How to detect if a client browser is still receiving data from a CGI script

Posted on 1997-01-08
1
Medium Priority
?
244 Views
Last Modified: 2013-12-25
I have a situation where it would help if I could detect if a browser is still receiving data from a script. Perhaps STDOUT closes when a browser presses Stop or goes somewhere else? Are there any Perl functions that report on socket/handle status?

Thanks for any help!
0
Comment
Question by:AIRWOLF-mad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
glenk010897 earned 380 total points
ID: 1827533
The problem with the httpd/cgi protocol occurs when a user presses the Stop button on the browser. The web server that is responding to the request is given no immediate notice to abort its process. When a user aborts, the browser simply closes the socket that it had with the web server. The next time the server tries to write some data to that socket, it detects that the socket has been closed.

Yes there is a way - but you will have to change your implementation so that it first checks to see if the socket is still active.

For details plus sample Perl  code see the following page from the Genome Database website.

http://wwwtest.gdb.org/browser/abort/cgiAbort.html
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question