Branch: Tag:

2002-07-10

2002-07-10 13:57:36 by Anders Johansson <anders@roxen.com>

Reset connection timeout when the client sends some data and we're waiting for more. This prevents big file uploads from being cut of after 90 seconds.

Rev: server/protocols/http.pike:1.373

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.372 2002/07/03 15:28:48 grubba Exp $"; + constant cvs_version = "$Id: http.pike,v 1.373 2002/07/10 13:57:36 anders Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
1062:    int elapsed = predef::time(1)-time;    if(time && elapsed >= 30)    { +  REQUEST_WERR("HTTP: Connection timed out. Closing.");    MARK_FD("HTTP timeout");    end();    } else {
2036:    if(strlen(s) + have_data < wanted_data)    {    have_data += strlen(s); +  // Reset timeout. +  remove_call_out(do_timeout); +  call_out(do_timeout, 90);    REQUEST_WERR("HTTP: We want more data.");    return;    }