Branch: Tag:

2002-07-17

2002-07-17 17:57:22 by Martin Nilsson <mani@lysator.liu.se>

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/plugins/protocols/http.pike:1.380

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.379 2002/07/05 02:10:36 nilsson Exp $"; + constant cvs_version = "$Id: http.pike,v 1.380 2002/07/17 17:57:22 nilsson Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
1014:    int elapsed = predef::time(1)-time;    if(time && elapsed >= 30)    { +  REQUEST_WERR("HTTP: Connection timed out. Closing.");    MARK_FD("HTTP timeout");    end();    } else {
1915:    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;    }