Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 1997-01-08
1
Medium Priority
?
265 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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
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)
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses
Course of the Month20 days, 16 hours left to enroll

810 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