Changeset 1899

Show
Ignore:
Timestamp:
08/13/2007 11:15:22 AM (13 months ago)
Author:
darix
Message:

- fix the frigging 404-handler bugs:

  • dont restore the http status code unconditionally (1270)
  • mod_staticfile should set the http status properly. otherwise we run into the 404 handling twice and it appends the default 404 page to the content. (this passed the testsuite)
Location:
branches/lighttpd-1.4.x/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-1.4.x/src/connections.c

    r1873 r1899  
    14461446                                        /* error-handler is back and has generated content */ 
    14471447                                        /* if Status: was set, take it otherwise use 200 */ 
    1448                                         con->http_status = con->error_handler_saved_status; 
     1448                                        if (con->http_status == 0) { 
     1449                                                con->http_status = con->error_handler_saved_status; 
     1450                                        } 
    14491451                                } 
    14501452 
  • branches/lighttpd-1.4.x/src/mod_staticfile.c

    r1881 r1899  
    507507        http_chunk_append_file(srv, con, con->physical.path, 0, sce->st.st_size); 
    508508 
     509        con->http_status = 200; 
    509510        con->file_finished = 1; 
    510511