Changeset 482

Show
Ignore:
Timestamp:
07/28/2005 09:05:16 PM (3 years ago)
Author:
jan
Message:

added a switch to disable range requests, this doesn't fix #171 but is a workaround

Location:
branches/lighttpd-1.3.x/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-1.3.x/src/base.h

    r475 r482  
    235235        unsigned short use_xattr; 
    236236        unsigned short follow_symlink; 
     237        unsigned short range_requests; 
    237238         
    238239        /* debug */ 
  • branches/lighttpd-1.3.x/src/config.c

    r475 r482  
    7878                { "dir-listing.encoding",        NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },  /* 41 */ 
    7979                { "server.errorlog-use-syslog",  NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 42 */ 
     80                { "server.range-requests",       NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 43 */ 
    8081                 
    8182                { "server.host",                 "use server.bind instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET }, 
     
    143144                s->kbytes_per_second = 0; 
    144145                s->allow_http11  = 1; 
     146                s->range_requests = 1; 
    145147                s->global_kbytes_per_second = 0; 
    146148                s->global_bytes_per_second_cnt = 0; 
     
    183185                cv[40].destination = s->dirlist_css; 
    184186                cv[41].destination = s->dirlist_encoding; 
     187                cv[43].destination = &(s->range_requests); 
    185188                 
    186189                srv->config_storage[i] = s; 
     
    229232        PATCH(log_file_not_found); 
    230233         
     234        PATCH(range_requests); 
     235         
    231236        return 0; 
    232237} 
     
    254259                        } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.dir-listing"))) { 
    255260                                PATCH(dir_listing); 
     261                        } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.range-requests"))) { 
     262                                PATCH(range_requests); 
    256263                        } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("dir-listing.hide-dotfiles"))) { 
    257264                                PATCH(hide_dotfiles); 
  • branches/lighttpd-1.3.x/src/response.c

    r470 r482  
    12911291                                 */ 
    12921292                                 
    1293                                 con->uri.path->used -= strlen(pathinfo); 
     1293                                con->uri.path->used -= con->request.pathinfo->used - 1; 
    12941294                                con->uri.path->ptr[con->uri.path->used - 1] = '\0'; 
    12951295                        } 
     
    14521452                        http_response_handle_cachable(srv, con, con->fce->st.st_mtime); 
    14531453                                                 
    1454                         if (con->http_status == 0 && con->request.http_range) { 
     1454                        if (con->conf.range_requests && 
     1455                            con->http_status == 0 &&  
     1456                            con->request.http_range) { 
    14551457                                http_response_parse_range(srv, con); 
    14561458                        } else if (con->http_status == 0) {