1. 05 Jul, 2018 6 commits
    • Yann Ylavic's avatar
      Merge r1833875 from trunk: · 31878ee9
      Yann Ylavic authored
      mod_ratelimit: fix behavior with proxied content
      
      mod_ratelimit works by splitting data in "chunks"
      to send to the client, sleeping a predefined amount
      of time between them (200ms). So for example,
      a rate-limit 40 value would correspond to a chunk size
      of 8192 bytes, flushed to the client every 200ms.
      
      The idea works fine when httpd directly serves the
      content, since the filter will be called once with
      a single bucket brigade. In the context of a proxied
      content though the filter is likely to be called multiple
      times, with a bucket brigade size that corresponds to
      the maximum allowed buffer size. If this value is lower
      or higher than the chunk size, the filter will not
      properly rate limit the data going to the client.
      
      This patch solves the problem with two fix:
      1) do_sleep is now stored in the ctx context struct,
         so if the filter is invoked multiple times it
         will still sleep when needed. For example, say
         that the chunk_size is 8192 and the bucket brigate
         len is 10240: the filter will flush 8192 bytes
         on the first invocation, sleep 200ms, flush the
         remaining bytes and then finish. The next invocation
         will do the same, clearly not leading to the
         correct "sleeping pattern".
      2) The example above highlights also another issue:
         mod_ratelimit should  flush only chunk_size bytes
         at the time (I am now excluding the burst calculation
         from the picture), and buffer between invocations
         unless the brigade contains EOS.
      
      The change has been tested with various scenarios and
      it looks working as expected, but of course more
      feedback/testing is welcome.
      
      The original patch was written by me and then Yann
      refactored the code to be more precise and efficient,
      basically transforming an axe in a wonderful Japanese
      katana sword, so credits to him for this work.
      
      PR: 62362
      
      
      Submitted by: elukey
      Reviewed by: elukey, jim, ylavic
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1835168 13f79535-47bb-0310-9956-ffa450edef68
      31878ee9
    • Lucien Gentis's avatar
      XML updates. · 70f11557
      Lucien Gentis authored
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1835146 13f79535-47bb-0310-9956-ffa450edef68
      70f11557
    • Yann Ylavic's avatar
      Vote, promote. · 474a7a50
      Yann Ylavic authored
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1835102 13f79535-47bb-0310-9956-ffa450edef68
      474a7a50
    • Ruediger Pluem's avatar
      * Vote · 6a3596b3
      Ruediger Pluem authored
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1835099 13f79535-47bb-0310-9956-ffa450edef68
      6a3596b3
    • Eric Covener's avatar
      vi for dummies · acd60fb9
      Eric Covener authored
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1835096 13f79535-47bb-0310-9956-ffa450edef68
      acd60fb9
    • Eric Covener's avatar
      unset ap_server_conf · 84da1ad7
      Eric Covener authored
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1835095 13f79535-47bb-0310-9956-ffa450edef68
      84da1ad7
  2. 03 Jul, 2018 4 commits
  3. 02 Jul, 2018 13 commits
  4. 01 Jul, 2018 4 commits
  5. 30 Jun, 2018 1 commit
  6. 29 Jun, 2018 2 commits
  7. 28 Jun, 2018 1 commit
  8. 27 Jun, 2018 3 commits
  9. 26 Jun, 2018 3 commits
  10. 25 Jun, 2018 3 commits