Changeset 2111

Show
Ignore:
Timestamp:
03/01/2008 07:10:47 PM (2 months ago)
Author:
stbuehler
Message:

fix sending "408 - Timeout" instead of "410 - Gone" for timedout urls in mod_secdownload (#1440)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/lighttpd-1.4.x/NEWS

    r2109 r2111  
    4848  * fix sending source of cgi script instead of 500 error if fork fails 
    4949  * fix min-procs handling in mod_scgi.c, just set to max-procs (patch from #623) 
     50  * fix sending "408 - Timeout" instead of "410 - Gone" for timedout urls in mod_secdownload (#1440) 
    5051 
    5152- 1.4.18 - 2007-09-09 
  • branches/lighttpd-1.4.x/src/mod_secure_download.c

    r1371 r2111  
    246246        if (srv->cur_ts - ts > p->conf.timeout || 
    247247            srv->cur_ts - ts < -p->conf.timeout) { 
    248                 con->http_status = 408; 
     248                /* "Gone" as the url will never be valid again instead of "408 - Timeout" where the request may be repeated */ 
     249                con->http_status = 410; 
    249250 
    250251                return HANDLER_FINISHED; 
  • branches/lighttpd-1.4.x/tests/mod-secdownload.t

    r2027 r2111  
    4040EOF 
    4141 ); 
    42 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 408 } ]; 
     42$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 410 } ]; 
    4343 
    44 ok($tf->handle_http($t) == 0, 'secdownload - timeout'); 
     44ok($tf->handle_http($t) == 0, 'secdownload - gone (timeout)'); 
    4545 
    4646$t->{REQUEST}  = ( <<EOF