Changeset 1614

Show
Ignore:
Timestamp:
07/07/08 17:11:37 (3 months ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/cherokee/buffer.c

    r1590 r1614  
    658658 
    659659int    
    660 cherokee_buffer_is_endding (cherokee_buffer_t *buf, char c) 
     660cherokee_buffer_is_ending (cherokee_buffer_t *buf, char c) 
    661661{ 
    662662        if (cherokee_buffer_is_empty(buf)) 
     
    739739 
    740740ret_t  
    741 cherokee_buffer_drop_endding (cherokee_buffer_t *buffer, cuint_t num_chars) 
     741cherokee_buffer_drop_ending (cherokee_buffer_t *buffer, cuint_t num_chars) 
    742742{ 
    743743        int num; 
  • cherokee/trunk/cherokee/buffer.h

    r1602 r1614  
    9393 
    9494ret_t cherokee_buffer_move_to_begin      (cherokee_buffer_t  *buf, cuint_t pos); 
    95 ret_t cherokee_buffer_drop_endding       (cherokee_buffer_t  *buf, cuint_t num_chars); 
     95ret_t cherokee_buffer_drop_ending        (cherokee_buffer_t  *buf, cuint_t num_chars); 
    9696ret_t cherokee_buffer_multiply           (cherokee_buffer_t  *buf, int num); 
    9797ret_t cherokee_buffer_swap_chars         (cherokee_buffer_t  *buf, char a, char b); 
     
    106106ret_t cherokee_buffer_ensure_size        (cherokee_buffer_t  *buf, size_t size); 
    107107 
    108 int    cherokee_buffer_is_endding        (cherokee_buffer_t  *buf, char c); 
     108int    cherokee_buffer_is_ending         (cherokee_buffer_t  *buf, char c); 
    109109char   cherokee_buffer_end_char          (cherokee_buffer_t  *buf); 
    110110size_t cherokee_buffer_cnt_spn           (cherokee_buffer_t  *buf, cuint_t offset, char *str); 
  • cherokee/trunk/cherokee/connection.c

    r1613 r1614  
    984984         */ 
    985985        if (cherokee_buffer_end_char (&conn->host) == '.') 
    986                 cherokee_buffer_drop_endding (&conn->host, 1); 
     986                cherokee_buffer_drop_ending (&conn->host, 1); 
    987987         
    988988        return ret_ok; 
     
    13441344        char *end_username; 
    13451345 
    1346         /* Find user name endding: 
     1346        /* Find user name ending: 
    13471347         */ 
    13481348        begin = &conn->request.buf[2]; 
     
    14141414 
    14151415                cherokee_post_append (&conn->post, conn->incoming_header.buf + header_len, post_len); 
    1416                 cherokee_buffer_drop_endding (&conn->incoming_header, post_len); 
     1416                cherokee_buffer_drop_ending (&conn->incoming_header, post_len); 
    14171417        } 
    14181418 
  • cherokee/trunk/cherokee/connection_info.c

    r1375 r1614  
    191191                point = strchr (info->percent.buf, '.'); 
    192192                if (point != NULL)  
    193                         cherokee_buffer_drop_endding (&info->percent, (info->percent.buf + info->percent.len) - (point + 2));  
     193                        cherokee_buffer_drop_ending (&info->percent, (info->percent.buf + info->percent.len) - (point + 2));  
    194194        } 
    195195         
     
    207207                tmp = strchr (name.buf, '?'); 
    208208                if (tmp != NULL)  
    209                         cherokee_buffer_drop_endding (&name, (name.buf + name.len) - tmp); 
     209                        cherokee_buffer_drop_ending (&name, (name.buf + name.len) - tmp); 
    210210 
    211211                tmp = strrchr (name.buf, '/'); 
  • cherokee/trunk/cherokee/downloader.c

    r1441 r1614  
    275275                /* Drop the header that has been sent 
    276276                 */ 
    277                 cherokee_buffer_drop_endding (buf, written); 
     277                cherokee_buffer_drop_ending (buf, written); 
    278278                if (cherokee_buffer_is_empty (buf)) { 
    279279                        return ret_ok; 
     
    353353                        cherokee_buffer_add (&downloader->body, downloader->reply_header.buf + len, body_chunk); 
    354354 
    355                         cherokee_buffer_drop_endding (&downloader->reply_header, body_chunk); 
     355                        cherokee_buffer_drop_ending (&downloader->reply_header, body_chunk); 
    356356                } 
    357357 
  • cherokee/trunk/cherokee/encoder_gzip.c

    r1578 r1614  
    293293        }  
    294294 
    295         /* Add the endding: 
     295        /* Add the ending: 
    296296         * +---+---+---+---+---+---+---+---+ 
    297297         * |     CRC32     |     ISIZE     | 
  • cherokee/trunk/cherokee/handler_cgi_base.c

    r1611 r1614  
    662662         
    663663                                        pathinfo_len = end - p; 
    664                                         cherokee_buffer_drop_endding (&conn->local_directory, pathinfo_len); 
     664                                        cherokee_buffer_drop_ending (&conn->local_directory, pathinfo_len); 
    665665                                }  
    666666 
     
    708708        /* Clean up the mess 
    709709         */ 
    710         cherokee_buffer_drop_endding (&conn->local_directory, (req_len - pathinfo_len) - 1); 
     710        cherokee_buffer_drop_ending (&conn->local_directory, (req_len - pathinfo_len) - 1); 
    711711        return ret; 
    712712} 
     
    774774        if ((buffer->len > 4) && 
    775775            (strncmp (CRLF_CRLF, buffer->buf + buffer->len - 4, 4) == 0)) { 
    776                 cherokee_buffer_drop_endding (buffer, 2); 
     776                cherokee_buffer_drop_ending (buffer, 2); 
    777777        } 
    778778         
     
    10461046        if (pathinfo_len > 0) { 
    10471047                cherokee_buffer_add (&conn->pathinfo, pathinfo, pathinfo_len); 
    1048                 cherokee_buffer_drop_endding (buf, pathinfo_len); 
     1048                cherokee_buffer_drop_ending (buf, pathinfo_len); 
    10491049        } 
    10501050 
  • cherokee/trunk/cherokee/handler_common.c

    r1611 r1614  
    220220                 */ 
    221221                cherokee_buffer_add (&conn->pathinfo, pathinfo, pathinfo_len); 
    222                 cherokee_buffer_drop_endding (&conn->request, pathinfo_len); 
     222                cherokee_buffer_drop_ending (&conn->request, pathinfo_len); 
    223223 
    224224                /* Clean the local_directory, this connection is going 
     
    232232        }        
    233233 
    234         cherokee_buffer_drop_endding (&conn->local_directory, conn->request.len); 
     234        cherokee_buffer_drop_ending (&conn->local_directory, conn->request.len); 
    235235 
    236236        /* Is it a file? 
     
    320320 
    321321                        cherokee_iocache_mmap_release (iocache, file); 
    322                         cherokee_buffer_drop_endding (&conn->local_directory, index_len); 
     322                        cherokee_buffer_drop_ending (&conn->local_directory, index_len); 
    323323 
    324324                        TRACE (ENTRIES, "trying index '%s', exists %d\n", index, exists); 
     
    331331                        /* Add the index file to the request and clean up 
    332332                         */ 
    333                         cherokee_buffer_drop_endding (&conn->local_directory, conn->request.len); 
     333                        cherokee_buffer_drop_ending (&conn->local_directory, conn->request.len); 
    334334                        cherokee_buffer_add (&conn->request, index, index_len);  
    335335 
     
    340340                /* If the dir hasn't a index file, it uses dirlist 
    341341                 */ 
    342                 cherokee_buffer_drop_endding (&conn->local_directory, conn->request.len); 
     342                cherokee_buffer_drop_ending (&conn->local_directory, conn->request.len); 
    343343                return cherokee_handler_dirlist_new (hdl, cnt, MODULE_PROPS(PROP_COMMON(props)->props_dirlist)); 
    344344        } 
  • cherokee/trunk/cherokee/handler_dirlist.c

    r1611 r1614  
    332332                re = cherokee_lstat (path->buf, &n->stat); 
    333333                if (re < 0) { 
    334                         cherokee_buffer_drop_endding (path, n->name_len); 
     334                        cherokee_buffer_drop_ending (path, n->name_len); 
    335335 
    336336                        free (n); 
     
    340340                /* Clean up and exit 
    341341                 */ 
    342                 cherokee_buffer_drop_endding (path, n->name_len); 
     342                cherokee_buffer_drop_ending (path, n->name_len); 
    343343 
    344344                *ret_entry = n; 
     
    456456 
    457457        if ((cherokee_buffer_is_empty (&conn->request)) || 
    458             (!cherokee_buffer_is_endding (&conn->request, '/')))  
     458            (!cherokee_buffer_is_ending (&conn->request, '/')))  
    459459        { 
    460460                /* Build the redirection address 
     
    616616         */ 
    617617        closedir(dir); 
    618         cherokee_buffer_drop_endding (&conn->local_directory, conn->request.len); /* 2 */ 
     618        cherokee_buffer_drop_ending (&conn->local_directory, conn->request.len); /* 2 */ 
    619619 
    620620        /* Sort the file list 
     
    682682                         
    683683                        ret = cherokee_buffer_read_file (&dhdl->header, conn->local_directory.buf); 
    684                         cherokee_buffer_drop_endding (&conn->local_directory, conn->request.len + filename_len); /* undo */ 
     684                        cherokee_buffer_drop_ending (&conn->local_directory, conn->request.len + filename_len); /* undo */ 
    685685                } else { 
    686686                        ret = cherokee_buffer_read_file (&dhdl->header, filename); 
  • cherokee/trunk/cherokee/handler_file.c

    r1611 r1614  
    531531        /* Undo the local directory 
    532532         */ 
    533         cherokee_buffer_drop_endding (&conn->local_directory, conn->request.len);      
     533        cherokee_buffer_drop_ending (&conn->local_directory, conn->request.len);       
    534534        return ret; 
    535535} 
  • cherokee/trunk/cherokee/handler_nn.c

    r1131 r1614  
    133133        cherokee_buffer_add (&conn->local_directory, conn->request.buf, conn->request.len); 
    134134        stat_ret = stat (conn->local_directory.buf, &info); 
    135         cherokee_buffer_drop_endding (&conn->local_directory, conn->request.len); 
     135        cherokee_buffer_drop_ending (&conn->local_directory, conn->request.len); 
    136136         
    137137        /* Maybe the file/dir exists 
  • cherokee/trunk/cherokee/handler_redir.c

    r1439 r1614  
    177177                                cherokee_buffer_clean (&conn->query_string); 
    178178                                cherokee_buffer_add (&conn->query_string, args, len); 
    179                                 cherokee_buffer_drop_endding (&conn->request, len+1); 
     179                                cherokee_buffer_drop_ending (&conn->request, len+1); 
    180180                        } 
    181181 
     
    202202out: 
    203203        if (! cherokee_buffer_is_empty (&conn->query_string)) 
    204                 cherokee_buffer_drop_endding (&conn->request, conn->query_string.len + 1); 
     204                cherokee_buffer_drop_ending (&conn->request, conn->query_string.len + 1); 
    205205 
    206206        return ret; 
     
    319319{ 
    320320        int                    request_end; 
    321         char                  *request_endding; 
     321        char                  *request_ending; 
    322322        cherokee_connection_t *conn = HANDLER_CONN(n); 
    323323     
     
    340340         */ 
    341341        request_end = (conn->request.len - conn->web_directory.len); 
    342         request_endding = conn->request.buf + conn->web_directory.len; 
     342        request_ending = conn->request.buf + conn->web_directory.len; 
    343343         
    344344        cherokee_buffer_ensure_size (&conn->redirect, request_end + HDL_REDIR_PROPS(n)->url.len +1); 
    345345        cherokee_buffer_add_buffer (&conn->redirect, &HDL_REDIR_PROPS(n)->url); 
    346         cherokee_buffer_add (&conn->redirect, request_endding, request_end); 
     346        cherokee_buffer_add (&conn->redirect, request_ending, request_end); 
    347347 
    348348        conn->error_code = http_moved_permanently; 
  • cherokee/trunk/cherokee/main_tweak.c

    r1439 r1614  
    179179        } 
    180180 
    181         cherokee_buffer_drop_endding (&dirname, (dirname.buf + dirname.len) - (tmp + 1)); 
     181        cherokee_buffer_drop_ending (&dirname, (dirname.buf + dirname.len) - (tmp + 1)); 
    182182 
    183183        /* Read files 
     
    198198 
    199199                if (cherokee_buffer_cmp_buf (&dirname, logname)) { 
    200                         cherokee_buffer_drop_endding (&dirname, d_name_len); 
     200                        cherokee_buffer_drop_ending (&dirname, d_name_len); 
    201201                        continue; 
    202202                } 
     
    210210                } 
    211211 
    212                 cherokee_buffer_drop_endding (&dirname, d_name_len); 
     212                cherokee_buffer_drop_ending (&dirname, d_name_len); 
    213213        } 
    214214 
  • cherokee/trunk/cherokee/plugin_loader.c

    r1506 r1614  
    534534        cherokee_avl_while (&loader->table, while_print_name, builtin, NULL, NULL); 
    535535        if (builtin->len > 2) 
    536                 cherokee_buffer_drop_endding (builtin, 2); 
     536                cherokee_buffer_drop_ending (builtin, 2); 
    537537                         
    538538        return ret_ok; 
  • cherokee/trunk/cherokee/rule_request.c

    r1482 r1614  
    9393restore: 
    9494        if (! cherokee_buffer_is_empty (&conn->query_string)) { 
    95                 cherokee_buffer_drop_endding (&conn->request, conn->query_string.len + 1); 
     95                cherokee_buffer_drop_ending (&conn->request, conn->query_string.len + 1); 
    9696        } 
    9797 
  • cherokee/trunk/cherokee/url.c

    r1131 r1614  
    170170                /* .. and remove it 
    171171                 */ 
    172                 ret = cherokee_buffer_drop_endding (&url->host, strlen(port)); 
     172                ret = cherokee_buffer_drop_ending (&url->host, strlen(port)); 
    173173                if (unlikely(ret < ret_ok)) return ret; 
    174174        } 
  • cherokee/trunk/cherokee/util.c

    r1611 r1614  
    12941294cherokee_fix_dirpath (cherokee_buffer_t *buf) 
    12951295{ 
    1296         while (cherokee_buffer_is_endding(buf, '/')) { 
    1297                 cherokee_buffer_drop_endding (buf, 1); 
    1298         } 
    1299  
    1300         return ret_ok; 
    1301 } 
     1296        while (cherokee_buffer_is_ending(buf, '/')) { 
     1297                cherokee_buffer_drop_ending (buf, 1); 
     1298        } 
     1299 
     1300        return ret_ok; 
     1301} 
  • cherokee/trunk/cherokee/validator_htpasswd.c

    r1439 r1614  
    263263 
    264264        if (conn->request.len > 0) 
    265                 cherokee_buffer_drop_endding (&conn->local_directory, conn->request.len-1);              /* 1: remove */ 
     265                cherokee_buffer_drop_ending (&conn->local_directory, conn->request.len-1);              /* 1: remove */ 
    266266 
    267267        return ret; 
  • cherokee/trunk/cherokee/validator_plain.c

    r1439 r1614  
    134134        } 
    135135 
    136         if (! cherokee_buffer_is_endding(&file, '\n')) 
     136        if (! cherokee_buffer_is_ending(&file, '\n')) 
    137137                cherokee_buffer_add_str (&file, "\n"); 
    138138