W3C home > Mailing lists > Public > www-talk@w3.org > September to October 2007

Re: How to handle errors if contents of response are dynamically generated?

From: Mark Baker <distobj@acm.org>
Date: Thu, 13 Sep 2007 14:26:28 -0400
Message-ID: <e9dffd640709131126x40097e2raa1f168c6558a79c@mail.gmail.com>
To: "X. Long" <xlong07@yahoo.com>
Cc: www-talk@w3.org

This is a well known problem with HTTP.

You should probably ask yourself what it makes sense for clients to do
in case of an error in your server/content, and then try to figure out
how to induce that behaviour.  If you could provide more detail about
your application/content, I might be able to give more specific


On 9/12/07, X. Long <xlong07@yahoo.com> wrote:
> Hi, I am developing a HTTP server and most of requests the server gets are
> for large size contents that are dynamically generated.
> Currently, the server is responsing in the following way: 1) upon receiving
> a request for object A, it constructs and sends a resposne header with
> status code 200 (of course no content-length specified) if the object is
> valid; 2) generates and buffers contents and sends buffered contents by HTTP
> chunk transfering.
> The problem here is how to handle potential errors during contents
> generation in the server. Since a 200 response has already been sent, I
> cannot send another response with another status code.
> I can (i) close the connection but the clients (e.g., IE) will just end as
> the entire data have been received. (2) send nothing and wish clients will
> timeout themselves. But it seems dangurous that there are chances some
> clients will be hanging there for a very long time.
> I am wondering what the "standard" way the server is expected to behavior
> under such situation. Any comments are welcomed and appreciated!
> ________________________________
> Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.

Mark Baker.  Ottawa, Ontario, CANADA.         http://www.markbaker.ca
Coactus; Web-inspired integration strategies  http://www.coactus.com
Received on Thursday, 13 September 2007 18:26:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:06 UTC