Welcome! Log In Create A New Profile

Advanced

Re: [patch-1] Range filter: support multiple ranges.

Maxim Dounin
November 09, 2017 09:50AM
Hello!

On Fri, Oct 27, 2017 at 06:50:32PM +0800, 胡聪 (hucc) wrote:

> # HG changeset patch
> # User hucongcong <hucong.c@foxmail.com>
> # Date 1509099940 -28800
> # Fri Oct 27 18:25:40 2017 +0800
> # Node ID 62c100a0d42614cd46f0719c0acb0ad914594217
> # Parent b9850d3deb277bd433a689712c40a84401443520
> Range filter: support multiple ranges.

This summary line is at least misleading.

> When multiple ranges are requested, nginx will coalesce any of the ranges
> that overlap, or that are separated by a gap that is smaller than the
> NGX_HTTP_RANGE_MULTIPART_GAP macro.

(Note that the patch also does reordering of ranges. For some
reason this is not mentioned in the commit log. There are also
other changes not mentioned in the commit log - for example, I see
ngx_http_range_t was moved to ngx_http_request.h. These are
probably do not belong to the patch at all.)

Reordering and/or coalescing ranges is not something that clients
usually expect to happen. This was widely discussed at the time
of CVE-2011-3192 vulnerability in Apache. As a result, RFC 7233
introduced the "MAY coalesce" clause. But this doesn't make
clients, especially old ones, magically prepared for this.

Moreover, this will certainly break some use cases like "request
some metadata first, and then rest of the file". So this is
certainly not a good idea to always reorder / coalesce ranges
unless this is really needed for some reason. (Or even at all,
as just returning 200 might be much more compatible with various
clients, as outlined above.)

It is also not clear what you are trying to achieve with this
patch. You may want to elaborate more on what problem you are
trying to solve, may be there are better solutions.

[...]

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[patch-1] Range filter: support multiple ranges.

胡聪 (hucc) 607 October 27, 2017 06:52AM

Re: [patch-1] Range filter: support multiple ranges.

Maxim Dounin 209 November 09, 2017 09:50AM

Re: [patch-1] Range filter: support multiple ranges.

胡聪 (hucc) 188 November 09, 2017 02:58PM

Re: [patch-1] Range filter: support multiple ranges.

胡聪 (hucc) 178 November 09, 2017 03:44PM

Re: [patch-1] Range filter: support multiple ranges.

胡聪 (hucc) 267 November 10, 2017 06:04AM

Re: [patch-1] Range filter: support multiple ranges.

Maxim Dounin 461 November 14, 2017 11:58AM

Re: [patch-1] Range filter: support multiple ranges.

胡聪 (hucc) 407 November 21, 2017 10:56AM

Re: [patch-1] Range filter: support multiple ranges.

Maxim Dounin 272 November 14, 2017 10:00AM

Re: [patch-1] Range filter: support multiple ranges.

胡聪 (hucc) 294 November 15, 2017 09:12PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 189
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready