Commit 609c4939 authored by Rainer Jung's avatar Rainer Jung
Browse files

core: Add MaxRanges directive to control the number of ranges permitted

before returning the entire resource, with a default limit of 200.

Set 'Accept-Ranges: none' in the case Ranges are being ignored with
MaxRanges none.

Backport of r1162584, r1162587, r1166282, r1166663 and r1166667 from
trunk resp. r1164894, r1164896, r1166612 and r1166772 from 2.2.x.

Proposed/Backported by: rjung
Reviewed by: wrowe, covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@1489917 13f79535-47bb-0310-9956-ffa450edef68
parent 20f8634c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -28,6 +28,13 @@ Changes with Apache 2.0.65
     is enabled, could allow local users to gain privileges via a .htaccess
     file. [Stefan Fritsch, Greg Ames]

  *) core: Add MaxRanges directive to control the number of ranges permitted
     before returning the entire resource, with a default limit of 200.
     [Eric Covener, Rainer Jung]

  *) Set 'Accept-Ranges: none' in the case Ranges are being ignored with
     MaxRanges none.  [Eric Covener, Rainer Jung]

  *) mod_rewrite: Allow merging RewriteBase down to subdirectories
     if new option 'RewriteOptions MergeBase' is configured.
     [Eric Covener]
+0 −15
Original line number Diff line number Diff line
@@ -164,21 +164,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  * byterange: Backport MaxRanges configuration directive and
    ap_set_accept_ranges() utility function.
    Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1162584
                 http://svn.apache.org/viewvc?view=revision&revision=1162584
                 http://svn.apache.org/viewvc?view=revision&revision=1162587
                 http://svn.apache.org/viewvc?view=revision&revision=1166282
                 http://svn.apache.org/viewvc?view=revision&revision=1166663
                 http://svn.apache.org/viewvc?view=revision&revision=1166667
    2.2.x patch: http://svn.apache.org/viewvc?view=revision&revision=1164894
                 http://svn.apache.org/viewvc?view=revision&revision=1164896
                 http://svn.apache.org/viewvc?view=revision&revision=1166612
                 http://svn.apache.org/viewvc?view=revision&revision=1166772
    2.0.x patch: http://people.apache.org/~rjung/patches/max-ranges-2.0.patch
    +1: rjung, wrowe, covener


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ please place SVN revisions from trunk here, so it is easy to
+7 −0
Original line number Diff line number Diff line
@@ -446,6 +446,13 @@ DefaultType text/plain
#
HostnameLookups Off

#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
+7 −0
Original line number Diff line number Diff line
@@ -372,6 +372,13 @@ DefaultType text/plain
#
HostnameLookups Off

#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
+35 −0
Original line number Diff line number Diff line
@@ -2112,6 +2112,41 @@ connection</description>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>MaxRanges</name>
<description>Number of ranges allowed before returning the complete
resource </description>
<syntax>MaxRanges default | unlimited | none | <var>number-of-ranges</var></syntax>
<default>MaxRanges 200</default>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context>
</contextlist>
<compatibility>Available in Apache HTTP Server 2.0.65 and later</compatibility>

<usage>
    <p>The <directive>MaxRanges</directive> directive
    limits the number of HTTP ranges the server is willing to
    return to the client.  If more ranges then permitted are requested,
    the complete resource is returned instead.</p>

    <dl>
      <dt><strong>default</strong></dt>
      <dd>Limits the number of ranges to a compile-time default of 200.</dd>

      <dt><strong>none</strong></dt>
      <dd>Range headers are ignored.</dd>

      <dt><strong>unlimited</strong></dt>
      <dd>The server does not limit the number of ranges it is
          willing to satisfy.</dd>

      <dt><var>number-of-ranges</var></dt>
      <dd>A positive number representing the maximum number of ranges the
      server is willing to satisfy.</dd>
    </dl>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>NameVirtualHost</name>
<description>Designates an IP address for name-virtual
Loading