[PATCH] Allow Partial Content responses to satisfy Range requests

Maxim Dounin mdounin at mdounin.ru
Thu Dec 4 19:37:57 UTC 2014


Hello!

On Tue, Nov 25, 2014 at 02:22:13PM +0000, Steven Hartland wrote:

> # HG changeset patch
> # User Steven Hartland <steven.hartland at multiplay.co.uk>
> # Date 1416925134 0
> #      Tue Nov 25 14:18:54 2014 +0000
> # Node ID 0c3c06fabfc3b1c57710c0cced4837c10e3e9bbb
> # Parent  7d7eac6e31df1d962a644f8093c1fbb8f91620ce
> Allow Partial Content responses to satisfy Range requests.

[...]

> -        if (ctx->ranges.nelts == 1) {
> -            return ngx_http_range_singlepart_header(r, ctx);
> +            return ngx_http_range_multipart_header(r, ctx);
> +
> +        case NGX_HTTP_RANGE_NOT_SATISFIABLE:
> +            return ngx_http_range_not_satisfiable(r);

[...]

>  static ngx_int_t
> -ngx_http_range_not_satisfiable(ngx_http_request_t *r)
> +ngx_http_range_not_satisfiable(ngx_http_request_t *r,
> +    ngx_http_range_filter_ctx_t *ctx)
>  {

Expectedly fails to build here:

src/http/modules/ngx_http_range_filter_module.c: In function 'ngx_http_range_header_filter':
src/http/modules/ngx_http_range_filter_module.c:254: error: too few arguments to function 'ngx_http_range_not_satisfiable'
*** [objs/src/http/modules/ngx_http_range_filter_module.o] Error code 1

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list