comparison src/http/ngx_http_write_filter.c @ 394:e7a68e14ccd3

nginx-0.0.7-2004-07-16-10:33:35 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 16 Jul 2004 06:33:35 +0000
parents 5659d773cfa8
children f8f0f1834266
comparison
equal deleted inserted replaced
393:5659d773cfa8 394:e7a68e14ccd3
40 ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) 40 ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
41 { 41 {
42 int last; 42 int last;
43 off_t size, flush, sent; 43 off_t size, flush, sent;
44 ngx_chain_t *cl, *ln, **ll, *chain; 44 ngx_chain_t *cl, *ln, **ll, *chain;
45 ngx_http_core_srv_conf_t *cscf;
45 ngx_http_core_loc_conf_t *clcf; 46 ngx_http_core_loc_conf_t *clcf;
46 ngx_http_write_filter_ctx_t *ctx; 47 ngx_http_write_filter_ctx_t *ctx;
47 48
48 ctx = ngx_http_get_module_ctx(r->main ? r->main : r, 49 ctx = ngx_http_get_module_ctx(r->main ? r->main : r,
49 ngx_http_write_filter_module); 50 ngx_http_write_filter_module);
121 return NGX_OK; 122 return NGX_OK;
122 } 123 }
123 124
124 sent = r->connection->sent; 125 sent = r->connection->sent;
125 126
126 /* STUB */ 127 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
127 #if (NGX_OPENSSL) 128
128 if (r->connection->ssl) { 129 chain = cscf->send_chain(r->connection, ctx->out,
129 chain = ngx_http_ssl_write(r->connection, ctx->out, 130 clcf->limit_rate ? clcf->limit_rate:
130 clcf->limit_rate ? clcf->limit_rate: 131 OFF_T_MAX_VALUE);
131 OFF_T_MAX_VALUE);
132 } else {
133 #endif
134 chain = ngx_write_chain(r->connection, ctx->out,
135 clcf->limit_rate ? clcf->limit_rate:
136 OFF_T_MAX_VALUE);
137 #if (NGX_OPENSSL)
138 }
139 #endif
140 132
141 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 133 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
142 "http write filter %X", chain); 134 "http write filter %X", chain);
143 135
144 if (clcf->limit_rate) { 136 if (clcf->limit_rate) {