~ubuntu-branches/debian/squeeze/nginx/squeeze

« back to all changes in this revision

Viewing changes to src/http/ngx_http_core_module.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2009-11-08 09:53:46 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20091108095346-yt4eypw2l176tl53
Tags: 0.7.63-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
433
433
      offsetof(ngx_http_core_loc_conf_t, limit_rate),
434
434
      NULL },
435
435
 
 
436
    { ngx_string("limit_rate_after"),
 
437
      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
 
438
                        |NGX_CONF_TAKE1,
 
439
      ngx_conf_set_size_slot,
 
440
      NGX_HTTP_LOC_CONF_OFFSET,
 
441
      offsetof(ngx_http_core_loc_conf_t, limit_rate_after),
 
442
      NULL },
 
443
 
436
444
    { ngx_string("keepalive_timeout"),
437
445
      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE12,
438
446
      ngx_http_core_keepalive,
877
885
                      "client intended to send too large body: %O bytes",
878
886
                      r->headers_in.content_length_n);
879
887
 
 
888
        (void) ngx_http_discard_request_body(r);
880
889
        ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE);
881
890
        return NGX_OK;
882
891
    }
2691
2700
 
2692
2701
    cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_main_conf_t));
2693
2702
    if (cmcf == NULL) {
2694
 
        return NGX_CONF_ERROR;
 
2703
        return NULL;
2695
2704
    }
2696
2705
 
2697
2706
    if (ngx_array_init(&cmcf->servers, cf->pool, 4,
2698
2707
                       sizeof(ngx_http_core_srv_conf_t *))
2699
2708
        != NGX_OK)
2700
2709
    {
2701
 
        return NGX_CONF_ERROR;
 
2710
        return NULL;
2702
2711
    }
2703
2712
 
2704
2713
    cmcf->server_names_hash_max_size = NGX_CONF_UNSET_UINT;
2750
2759
 
2751
2760
    cscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_srv_conf_t));
2752
2761
    if (cscf == NULL) {
2753
 
        return NGX_CONF_ERROR;
 
2762
        return NULL;
2754
2763
    }
2755
2764
 
2756
2765
    /*
2763
2772
                       sizeof(ngx_http_listen_t))
2764
2773
        != NGX_OK)
2765
2774
    {
2766
 
        return NGX_CONF_ERROR;
 
2775
        return NULL;
2767
2776
    }
2768
2777
 
2769
2778
    if (ngx_array_init(&cscf->server_names, cf->temp_pool, 4,
2770
2779
                       sizeof(ngx_http_server_name_t))
2771
2780
        != NGX_OK)
2772
2781
    {
2773
 
        return NGX_CONF_ERROR;
 
2782
        return NULL;
2774
2783
    }
2775
2784
 
2776
2785
    cscf->connection_pool_size = NGX_CONF_UNSET_SIZE;
2881
2890
 
2882
2891
    lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_loc_conf_t));
2883
2892
    if (lcf == NULL) {
2884
 
        return NGX_CONF_ERROR;
 
2893
        return NULL;
2885
2894
    }
2886
2895
 
2887
2896
    /*
2920
2929
    lcf->send_lowat = NGX_CONF_UNSET_SIZE;
2921
2930
    lcf->postpone_output = NGX_CONF_UNSET_SIZE;
2922
2931
    lcf->limit_rate = NGX_CONF_UNSET_SIZE;
 
2932
    lcf->limit_rate_after = NGX_CONF_UNSET_SIZE;
2923
2933
    lcf->keepalive_timeout = NGX_CONF_UNSET_MSEC;
2924
2934
    lcf->keepalive_header = NGX_CONF_UNSET;
2925
2935
    lcf->keepalive_requests = NGX_CONF_UNSET_UINT;
3119
3129
    ngx_conf_merge_size_value(conf->postpone_output, prev->postpone_output,
3120
3130
                              1460);
3121
3131
    ngx_conf_merge_size_value(conf->limit_rate, prev->limit_rate, 0);
 
3132
    ngx_conf_merge_size_value(conf->limit_rate_after, prev->limit_rate_after,
 
3133
                              0);
3122
3134
    ngx_conf_merge_msec_value(conf->keepalive_timeout,
3123
3135
                              prev->keepalive_timeout, 75000);
3124
3136
    ngx_conf_merge_sec_value(conf->keepalive_header,