comparison src/http/ngx_http_spdy_filter_module.c @ 5515:e5fb14e85040

SPDY: added the "spdy_chunk_size" directive.
author Valentin Bartenev <vbart@nginx.com>
date Tue, 14 Jan 2014 16:24:45 +0400
parents b7ee1bae0ffa
children 439d05a037a3
comparison
equal deleted inserted replaced
5514:b7ee1bae0ffa 5515:e5fb14e85040
624 off_t size, offset; 624 off_t size, offset;
625 size_t rest, frame_size; 625 size_t rest, frame_size;
626 ngx_chain_t *cl, *out, **ln; 626 ngx_chain_t *cl, *out, **ln;
627 ngx_http_request_t *r; 627 ngx_http_request_t *r;
628 ngx_http_spdy_stream_t *stream; 628 ngx_http_spdy_stream_t *stream;
629 ngx_http_spdy_loc_conf_t *slcf;
629 ngx_http_spdy_out_frame_t *frame; 630 ngx_http_spdy_out_frame_t *frame;
630 631
631 r = fc->data; 632 r = fc->data;
632 stream = r->spdy_stream; 633 stream = r->spdy_stream;
633 634
662 663
663 } else { 664 } else {
664 offset = 0; 665 offset = 0;
665 } 666 }
666 667
667 frame_size = (limit && limit < NGX_SPDY_MAX_FRAME_SIZE) 668 slcf = ngx_http_get_module_loc_conf(r, ngx_http_spdy_module);
668 ? limit : NGX_SPDY_MAX_FRAME_SIZE; 669
670 frame_size = (limit && limit <= (off_t) slcf->chunk_size)
671 ? (size_t) limit
672 : slcf->chunk_size;
669 673
670 for ( ;; ) { 674 for ( ;; ) {
671 ln = &out; 675 ln = &out;
672 rest = frame_size; 676 rest = frame_size;
673 677
741 745
742 if (limit == 0) { 746 if (limit == 0) {
743 break; 747 break;
744 } 748 }
745 749
746 if (limit < NGX_SPDY_MAX_FRAME_SIZE) { 750 if (limit < (off_t) slcf->chunk_size) {
747 frame_size = limit; 751 frame_size = limit;
748 } 752 }
749 } 753 }
750 } 754 }
751 755