Changeset 1598

Show
Ignore:
Timestamp:
07/02/08 19:58:34 (4 months ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r1597 r1598  
    112008-07-02  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * cherokee/connection.c (cherokee_connection_create_handler): 
     4        Clean up. 
     5 
     6        * cherokee/connection.c (cherokee_connection_build_local_directory): 
     7        Do not short the request string when the web directory is /. It 
     8        means that the Default rule matched. In this way, web_directory 
     9        will be / and the request will continue starting by slash. 
    210 
    311        * cherokee/handler_cgi.c (manage_child_cgi_process): Adds SIGBUS 
  • cherokee/trunk/cherokee/connection.c

    r1584 r1598  
    11761176                 */ 
    11771177                cherokee_buffer_add_buffer (&conn->request_original, &conn->request); 
    1178                 cherokee_buffer_move_to_begin (&conn->request, conn->web_directory.len); 
     1178 
     1179                if (conn->web_directory.len > 1) 
     1180                        cherokee_buffer_move_to_begin (&conn->request, conn->web_directory.len); 
    11791181         
    11801182                if ((conn->request.len >= 2) && (strncmp(conn->request.buf, "//", 2) == 0)) { 
     
    16901692         */ 
    16911693        ret = (config_entry->handler_new_func) ((void **)&conn->handler, conn, config_entry->handler_properties); 
    1692         if (ret == ret_eagain) return ret_eagain; 
    1693         if (ret != ret_ok) { 
    1694                 if ((conn->handler == NULL) && (conn->error_code == http_ok)) { 
     1694        switch (ret) { 
     1695        case ret_ok: 
     1696        case ret_eagain: 
     1697                return ret; 
     1698        default: 
     1699                if ((conn->handler == NULL) && 
     1700                    (conn->error_code == http_ok)) 
    16951701                        conn->error_code = http_internal_error; 
    1696                 } 
    16971702                return ret_error; 
    16981703        } 
     
    17131718        ret = cherokee_header_get_known (&conn->header, header_connection, &ptr, &ptr_len); 
    17141719        if (ret == ret_ok) { 
    1715  
    17161720                if (strncasecmp (ptr, "close", 5) == 0) { 
    17171721                        conn->keepalive = 0;