Stefan Fritsch
4db71797ea
Fix 3xx responses with local URLs as ErrorDocument
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1187985 13f79535-47bb-0310-9956-ffa450edef68
2011-10-23 22:07:50 +00:00
Stefan Fritsch
a524f440c3
Adjust log message to reflect changed behaviour
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1175992 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 18:50:28 +00:00
Jim Jagielski
a7433ead1d
Put 0- on the fast-track
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1175980 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 18:12:41 +00:00
Stefan Fritsch
1951a037bf
More cleanup: Expand tabs and some more indentation fixes
...
No functional change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
Jim Jagielski
427c85bd23
Cleanup effort in prep for GA push:
...
Trim trailing whitespace... no func change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
b279698681
use random value as multipart range boundary to prevent leaking information
...
about the used MPM
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1171250 13f79535-47bb-0310-9956-ffa450edef68
2011-09-15 19:55:27 +00:00
Stefan Fritsch
2d4e23d88b
Create wrapper API for apr_random;
...
use in mod_lbmethod_heartbeat and mod_serf to
- replace some needles use of apr_generate_random_bytes
- remove code duplication
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1171247 13f79535-47bb-0310-9956-ffa450edef68
2011-09-15 19:53:59 +00:00
Jim Jagielski
625b89a7e2
Add in MaxRangeOverlaps and MaxRangeReversals to accomodate
...
more control over acceptable Range headers:
See: http://trac.tools.ietf.org/wg/httpbis/trac/ticket/311
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1169756 13f79535-47bb-0310-9956-ffa450edef68
2011-09-12 14:15:53 +00:00
Jim Jagielski
0693a7054e
Save creation of merged until we know we will actually need and use it.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1167310 13f79535-47bb-0310-9956-ffa450edef68
2011-09-09 17:44:37 +00:00
Jim Jagielski
c34f001809
return some range params admins may want to control (overlaps and reversals)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1167309 13f79535-47bb-0310-9956-ffa450edef68
2011-09-09 17:44:31 +00:00
Jim Jagielski
9cbc0b6774
Remove function so we can grab over core_conf elements easily
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1167308 13f79535-47bb-0310-9956-ffa450edef68
2011-09-09 17:44:29 +00:00
Jim Jagielski
2ab6b78667
Reorg so we don't need forward def...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1167307 13f79535-47bb-0310-9956-ffa450edef68
2011-09-09 17:44:26 +00:00
Jim Jagielski
fe74b5b58a
Reset
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1167264 13f79535-47bb-0310-9956-ffa450edef68
2011-09-09 16:02:21 +00:00
Jim Jagielski
92e6b2882b
No reason for the advanced def...
...
Open hook for other conf factors (number of overlaps, etc)...
Return some range params...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1167263 13f79535-47bb-0310-9956-ffa450edef68
2011-09-09 16:02:18 +00:00
William A. Rowe Jr
72d4ba405b
What getpid()? No backport of this edit is needed.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1167147 13f79535-47bb-0310-9956-ffa450edef68
2011-09-09 13:09:25 +00:00
Eric Covener
c45e14b246
refactor to pull setting of Accept-Ranges header into http_protocol.c which
...
had been copied to other handlers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166663 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 12:56:08 +00:00
Eric Covener
189a8b1eb5
add AP_ prefix to recently added DEFAULT_MAX_RANGES
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166349 13f79535-47bb-0310-9956-ffa450edef68
2011-09-07 19:51:01 +00:00
Eric Covener
fe5f7b561d
take care of some MaxRanges feedback:
...
* allow "none" to be expressed in config
* send Accept-Ranges: none with MaxRanges none
* stop accepting confusing/ambiguous "0", start accepting "unlimited".
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166282 13f79535-47bb-0310-9956-ffa450edef68
2011-09-07 17:29:49 +00:00
Joe Orton
571b03678e
* modules/http/byterange_filter.c (ap_byterange_filter): Don't reveal
...
the pid in the boundary delimiter (part of CVE-2003-1418).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1165268 13f79535-47bb-0310-9956-ffa450edef68
2011-09-05 12:59:07 +00:00
Stefan Fritsch
464bddc2c4
Revert r1163833:
...
Send a 206 response for a "Range: bytes=0-" request, even if 200 would be
more efficient.
As discussed on list: Clients that use the 206 response to detect range
support are considered broken and should be fixed to use the Accept-Ranges
header instead.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1165062 13f79535-47bb-0310-9956-ffa450edef68
2011-09-04 16:04:38 +00:00
Ruediger Pluem
975bdc6377
* Buckets of known length should be always splitable. So we don't need to care
...
about the APR_ENOTIMPL case.
Submitted by: jorton
Reviewed by: rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1164840 13f79535-47bb-0310-9956-ffa450edef68
2011-09-03 09:50:21 +00:00
Ruediger Pluem
c7c14f473f
* Fix a regression in the CVE-2011-3192 byterange fix:
...
Range: bytes=-1
Resulted in the first two bytes delivered, not in the last one.
PR: 51748
Submitted by: low_priority <lowprio20 gmail.com>
Reviewed by: rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1163985 13f79535-47bb-0310-9956-ffa450edef68
2011-09-01 10:25:45 +00:00
Stefan Fritsch
3652b5bd72
Remove log message left over from debugging.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1163920 13f79535-47bb-0310-9956-ffa450edef68
2011-09-01 06:42:40 +00:00
Ruediger Pluem
f3ac51aba0
* Fix error message
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1163918 13f79535-47bb-0310-9956-ffa450edef68
2011-09-01 06:30:02 +00:00
Ruediger Pluem
701c4d3035
* Whitespace police. No functional change
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1163917 13f79535-47bb-0310-9956-ffa450edef68
2011-09-01 06:25:57 +00:00
Ruediger Pluem
191278d046
* Ranges like --2 or -0 are invalid
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1163916 13f79535-47bb-0310-9956-ffa450edef68
2011-09-01 06:24:53 +00:00
Stefan Fritsch
da2c87459c
Fix some RFC 2616 14.35.1 compliance issues:
...
- If there is at least one syntactically invalid byte-range-spec,
we must ignore the whole header.
- If all ranges are unsatisfiable, send 416.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1163851 13f79535-47bb-0310-9956-ffa450edef68
2011-08-31 22:37:32 +00:00
Stefan Fritsch
c1e78e71e8
Send a 206 response for a "Range: bytes=0-" request, even if 200 would be more
...
efficient.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1163833 13f79535-47bb-0310-9956-ffa450edef68
2011-08-31 21:37:38 +00:00
Ruediger Pluem
6b7fd6d6ea
* Silence compiler warning
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1163197 13f79535-47bb-0310-9956-ffa450edef68
2011-08-30 13:14:14 +00:00
Stefan Fritsch
0d91fd2826
Remove some unused code that was included in r1162131 by accident or merge
...
error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162878 13f79535-47bb-0310-9956-ffa450edef68
2011-08-29 15:49:56 +00:00
Ruediger Pluem
33dc927198
* We don't need a copy of the original range as we don't change it. A pointer to it is sufficient
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162687 13f79535-47bb-0310-9956-ffa450edef68
2011-08-29 09:04:56 +00:00
Ruediger Pluem
547ed3b549
* Bit operators should be more efficient then the modulo operator (provided the compiler does not optimize on its own)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162669 13f79535-47bb-0310-9956-ffa450edef68
2011-08-29 07:51:29 +00:00
Stefan Fritsch
ecf3d3cc71
Unset Content-Length if we call ap_pass_brigade several times
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162665 13f79535-47bb-0310-9956-ffa450edef68
2011-08-29 07:28:56 +00:00
Eric Covener
1aaea94cb5
add MaxRanges directive institute a default limit of 200 (post-merge where
...
applicable) Ranges before returning the complete resource.
(minor mmn bump for core_dir_config addition)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162584 13f79535-47bb-0310-9956-ffa450edef68
2011-08-28 20:35:07 +00:00
Stefan Fritsch
abb883009e
Fix iteration over string
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162581 13f79535-47bb-0310-9956-ffa450edef68
2011-08-28 20:02:38 +00:00
Stefan Fritsch
ccd0312ce5
Every 32 ranges, pass the prepared ranges down the filter chain.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162579 13f79535-47bb-0310-9956-ffa450edef68
2011-08-28 19:45:21 +00:00
Ruediger Pluem
884647f594
* Do a better estimation on how elements we should allocate:
...
Preallocate the number of ranges as number of elements as this works good
for well behaving clients which we assume to be the most cases, but do
cut this at the arbitrary number of 100 to avoid too large preallocations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162565 13f79535-47bb-0310-9956-ffa450edef68
2011-08-28 17:52:44 +00:00
Ruediger Pluem
18edf9f28a
* Silence compiler warning
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162560 13f79535-47bb-0310-9956-ffa450edef68
2011-08-28 17:12:52 +00:00
Ruediger Pluem
602f7313fd
* Damm it. Missed another superflous whitespace.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162559 13f79535-47bb-0310-9956-ffa450edef68
2011-08-28 17:12:14 +00:00
Ruediger Pluem
4de7e4d8e9
* More style police. No functional changes
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162558 13f79535-47bb-0310-9956-ffa450edef68
2011-08-28 17:09:38 +00:00
Ruediger Pluem
cbbeb9ef63
* Style police. No functional changes
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162556 13f79535-47bb-0310-9956-ffa450edef68
2011-08-28 17:08:35 +00:00
Eric Covener
e800d3c63f
merge some more adjacent ranges such as a-n,n+1-b, and
...
refactor/reduce the tests on the start/end positions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162440 13f79535-47bb-0310-9956-ffa450edef68
2011-08-27 20:37:58 +00:00
Greg Ames
815caa5657
reverting. got feedback that maybe we don't want to merge 4-5,1-2 into 1-5
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162436 13f79535-47bb-0310-9956-ffa450edef68
2011-08-27 20:11:16 +00:00
Greg Ames
acac1296dd
merge totally reversed ranges like 4-5,1-2 into 1-5
...
I interpret the former test
if (!(end <= ostart || start-1 >= oend)) {
as
if (not(end is bad || start is good)) { merge }
ORing the bad condition with the good doesn't produce the desired result.
it is not necessary to test "end" due to the conditions tested in the assert.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162434 13f79535-47bb-0310-9956-ffa450edef68
2011-08-27 19:57:41 +00:00
Stefan Fritsch
5b2f4b9dfb
fix typo
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162419 13f79535-47bb-0310-9956-ffa450edef68
2011-08-27 18:58:43 +00:00
Stefan Fritsch
24291ddec8
remove obsolete macro
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162381 13f79535-47bb-0310-9956-ffa450edef68
2011-08-27 15:52:41 +00:00
Stefan Fritsch
4b2bb2573e
If the sum of all ranges in a request is not smaller than the file, fall back
...
to 200. This takes care of potential DoS issues from ranges like
0-100,1000-,0-100,1000-,...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162331 13f79535-47bb-0310-9956-ffa450edef68
2011-08-27 12:31:06 +00:00
Stefan Fritsch
25656f1ac4
fix function name in log message
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162325 13f79535-47bb-0310-9956-ffa450edef68
2011-08-27 11:44:03 +00:00
Stefan Fritsch
3d85576bd5
Remove traces of byterange_ctx, it's not necessary anymore
...
Initialize some variables to avoid (false positive) warnings with gcc 4.6.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162211 13f79535-47bb-0310-9956-ffa450edef68
2011-08-26 19:05:05 +00:00
Jim Jagielski
c2f2569354
not ruby
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162186 13f79535-47bb-0310-9956-ffa450edef68
2011-08-26 17:51:42 +00:00