Changeset 1607

Show
Ignore:
Timestamp:
07/04/08 14:08:58 (6 months ago)
Author:
alo
Message:

--

Files:

Legend:

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

    r1606 r1607  
    112008-07-04  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * cherokee/connection.c (cherokee_connection_use_webdir), 
     4        cherokee/connection-protected.h: New method. It points whether a 
     5        connection can use its web_directory property (which should only 
     6        be used when the 'conn_op_document_root' option is set and the 
     7        web_directory is longer than a single character). 
    28 
    39        * cherokee/connection-protected.h, cherokee/connection.c, 
  • cherokee/trunk/cherokee/connection-protected.h

    r1606 r1607  
    238238ret_t cherokee_connection_build_local_directory  (cherokee_connection_t *conn, cherokee_virtual_server_t *vsrv, cherokee_config_entry_t *entry); 
    239239ret_t cherokee_connection_build_local_directory_userdir (cherokee_connection_t *conn, cherokee_virtual_server_t *vsrv, cherokee_config_entry_t *entry); 
     240 
    240241ret_t cherokee_connection_clean_for_respin       (cherokee_connection_t *conn); 
     242int   cherokee_connection_use_webdir             (cherokee_connection_t *conn); 
    241243 
    242244/* Log 
  • cherokee/trunk/cherokee/connection.c

    r1606 r1607  
    11781178                if (conn->web_directory.len > 1) 
    11791179                        cherokee_buffer_move_to_begin (&conn->request, conn->web_directory.len); 
    1180          
     1180 
    11811181                if ((conn->request.len >= 2) && (strncmp(conn->request.buf, "//", 2) == 0)) { 
    11821182                        cherokee_buffer_move_to_begin (&conn->request, 1); 
     
    18961896 
    18971897 
     1898int 
     1899cherokee_connection_use_webdir (cherokee_connection_t *conn) 
     1900{ 
     1901        if (! (conn->options & conn_op_document_root)) 
     1902                return 0; 
     1903 
     1904        if (cherokee_buffer_is_empty (&conn->web_directory)) 
     1905                return 0; 
     1906 
     1907        return 1; 
     1908} 
     1909 
     1910 
    18981911#ifdef TRACE_ENABLED 
    18991912char *