comparison src/http/modules/ngx_http_range_filter_module.c @ 570:8246d8a2c2be NGINX_0_8_37

nginx 0.8.37 *) Feature: the ngx_http_split_clients_module. *) Feature: the "map" directive supports keys more than 255 characters. *) Bugfix: nginx ignored the "private" and "no-store" values in the "Cache-Control" backend response header line. *) Bugfix: a "stub" parameter of an "include" SSI directive was not used, if empty response has 200 status code. *) Bugfix: if a proxied or FastCGI request was internally redirected to another proxied or FastCGI location, then a segmentation fault might occur in a worker process; the bug had appeared in 0.8.33. Thanks to Yichun Zhang. *) Bugfix: IMAP connections may hang until they timed out while talking to Zimbra server. Thanks to Alan Batie.
author Igor Sysoev <http://sysoev.ru>
date Mon, 17 May 2010 00:00:00 +0400
parents 499474178a11
children 943566b4d82e
comparison
equal deleted inserted replaced
569:19b134bf21c0 570:8246d8a2c2be
222 if (r->headers_out.accept_ranges == NULL) { 222 if (r->headers_out.accept_ranges == NULL) {
223 return NGX_ERROR; 223 return NGX_ERROR;
224 } 224 }
225 225
226 r->headers_out.accept_ranges->hash = 1; 226 r->headers_out.accept_ranges->hash = 1;
227 r->headers_out.accept_ranges->key.len = sizeof("Accept-Ranges") - 1; 227 ngx_str_set(&r->headers_out.accept_ranges->key, "Accept-Ranges");
228 r->headers_out.accept_ranges->key.data = (u_char *) "Accept-Ranges"; 228 ngx_str_set(&r->headers_out.accept_ranges->value, "bytes");
229 r->headers_out.accept_ranges->value.len = sizeof("bytes") - 1;
230 r->headers_out.accept_ranges->value.data = (u_char *) "bytes";
231 229
232 return ngx_http_next_header_filter(r); 230 return ngx_http_next_header_filter(r);
233 } 231 }
234 232
235 233
353 } 351 }
354 352
355 r->headers_out.content_range = content_range; 353 r->headers_out.content_range = content_range;
356 354
357 content_range->hash = 1; 355 content_range->hash = 1;
358 content_range->key.len = sizeof("Content-Range") - 1; 356 ngx_str_set(&content_range->key, "Content-Range");
359 content_range->key.data = (u_char *) "Content-Range";
360 357
361 content_range->value.data = ngx_pnalloc(r->pool, 358 content_range->value.data = ngx_pnalloc(r->pool,
362 sizeof("bytes -/") - 1 + 3 * NGX_OFF_T_LEN); 359 sizeof("bytes -/") - 1 + 3 * NGX_OFF_T_LEN);
363 if (content_range->value.data == NULL) { 360 if (content_range->value.data == NULL) {
364 return NGX_ERROR; 361 return NGX_ERROR;
518 } 515 }
519 516
520 r->headers_out.content_range = content_range; 517 r->headers_out.content_range = content_range;
521 518
522 content_range->hash = 1; 519 content_range->hash = 1;
523 content_range->key.len = sizeof("Content-Range") - 1; 520 ngx_str_set(&content_range->key, "Content-Range");
524 content_range->key.data = (u_char *) "Content-Range";
525 521
526 content_range->value.data = ngx_pnalloc(r->pool, 522 content_range->value.data = ngx_pnalloc(r->pool,
527 sizeof("bytes */") - 1 + NGX_OFF_T_LEN); 523 sizeof("bytes */") - 1 + NGX_OFF_T_LEN);
528 if (content_range->value.data == NULL) { 524 if (content_range->value.data == NULL) {
529 return NGX_ERROR; 525 return NGX_ERROR;