?
Solved

Expiration of the result of form submission?

Posted on 1997-12-08
4
Medium Priority
?
182 Views
Last Modified: 2013-12-25
As part of a www-accessible database, I have a cgi script that processes form input submitted by the POST method. The cgi script takes about 15 seconds to return. When it does the browser displays a blank page. When I view the page source it would contain:

<TITLE>Missing Post reply data</TITLE>
<H1>Data Missing</H1>
This document resulted from a POST operation and has expired from the
cache.  If you wish you can repost the form data to recreate the
document by pressing the <b>reload</b> button.

When I hit the reload button. the page loads up as expected with the output of the cgi script. The output of the cgi script in this case is actually a vrml world. It is preceded with the appropriate Content-type header and the browser starts up the vrml viewer normally and displays
the vrml world.

The Question is how to avoid having to reload the the page to get the browser to display it. I tried adding a couple of header fields to the cgi script response to get it to extend the 'freshness' of the reply. I added an Expires: time that is few minutes ahead of the server time to give the reply ample time to get to the browser. I also added a Cache-Control: max-age directive to try to achieve the same result. neither the Expires time or max-age made a difference. Following is the output of the cgi script taken directly from a connection to port 80 (to
get all the headers).

HTTP/1.1 200 OK^M
Date: Sun, 07 Dec 1997 17:52:36 GMT^M
Server: Apache/1.2.1^M
Cache-Control: max-age=5000^M
Expires: Sun, 07 Dec 1997 17:55:42 GMT^M
Connection: close^M
Content-Type: model/vrml^M
^M
#VRML V2.0 utf8^M
etc.

My platform is SGI IRIX6.3, http server: apache 1.2.1 browser: communicator 4.04

0
Comment
Question by:m_n_
  • 2
4 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1831576
This, maybe, has nothing to do with your problem, but shouldn't be "Content-Type: x-world/x-vrml"?
0
 

Author Comment

by:m_n_
ID: 1831577
julio, the x-world/x-vrml was the experimental MIME type for VRML when VRML version 1.0 was being specified. VRML now have matured
and its final (non-experimental, no 'x-' qualifiers) MIME type is
model/vrml.
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831578
Thanks :)
0
 
LVL 1

Accepted Solution

by:
nanullnet earned 200 total points
ID: 1831579
It seems that the browser is timing out before it recieves any information from the server.  Correct me if I'm wrong, but the script does not return data until it is done processing the form results, correct?  Therefore, the script has timed out before recieving any data.

Try sending the "HTTP/1.1 OK\n" header before processing the results, then write the output to the browser when you are done.

If this doesn't work, you can always return a type Multipart/mixed, send HTML first, saying something like "processing..." then do the processing, and return the world content type when done.  That should work definately.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

757 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