httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: Appropriate patches for 2.2.19 and 2.0.64?
Date Sat, 03 Sep 2011 19:49:16 GMT
On Wed, Aug 31, 2011 at 9:51 PM, William A. Rowe Jr.
<wrowe@rowe-clan.net> wrote:
> On 8/31/2011 4:16 PM, William A. Rowe Jr. wrote:
>> I've attempted to simply substitute the 2.2.19 filter code into the
>> 2.0.64 http_protocol.c sources, and am unsure how far off these patches
>> are from what they need to be; there's been a significant amount of drift
>> and refactoring in the interim.
>
> Still looking for feedback, but the attached applies and corresponds to
> 2.2.20 with the exception of atoi rather than strtoi semantics, and without
> the no DefaultType exception..

Here's some more feedback :)  The commented-out line below in the
middle of your patch is borked, as the variable range has been moved
through the string being parsed by ap_getword().  cur is what we're
parsing this time through the loop, reflected in my minor
modification (the next line).

+        if (dash == range) {
+            /* In the form "-5" */
+            start = clength - apr_atoi64(dash + 1);
+            end = clength - 1;
+        }
+        else {
+            *dash++ = '\0';
+            /* wrowe: start = apr_atoi64(range); */
+            start = apr_atoi64(cur);
+            if (*dash) {
+                end = apr_atoi64(dash);
+            }
+            else {                  /* "5-" */
+                end = clength - 1;
+            }
+        }
+

Without this fix, I get this for the byterange tests against 2.0.x HEAD + patch:

t/apache/byterange.t      (Wstat: 0 Tests: 165 Failed: 121)
  Failed tests:  2-11, 13, 19-29, 31-32, 37-38, 40-41, 46-48
                50-53, 55, 57-60, 62-74, 76-80, 82-83, 85-88
                92, 94-95, 98-104, 107-110, 112-114, 116-118
                120-122, 125-135, 137-150, 153-155, 157
                159, 161, 163-165
t/apache/byterange4.t     (Wstat: 0 Tests: 153 Failed: 136)
  Failed tests:  18-153
t/apache/byterange5.t     (Wstat: 0 Tests: 5 Failed: 4)
  Failed tests:  1, 3-5
t/apache/byterange7.t     (Wstat: 0 Tests: 13 Failed: 5)
  Failed tests:  2-5, 12

With this fix, I get no testcase failures and this skippage:

t/apache/byterange.t ........ ok
t/apache/byterange2.t ....... ok
t/apache/byterange3.t ....... skipped: (no reason given)
t/apache/byterange4.t ....... ok
t/apache/byterange5.t ....... ok
t/apache/byterange6.t ....... skipped: apache version 2.3.15 or higher
is required, this is version 2.0.65
t/apache/byterange7.t ....... ok

Thanks for putting this together so that there was something to try out!!!!

Mime
View raw message