1. 11 Jul, 2017 5 commits
    • Evgeny Kotkov's avatar
      mpm_winnt: Remove an unnecessary Sleep() in the winnt_accept() function. · 062c97a3
      Evgeny Kotkov authored
      This sleep occured in a situation when:
      
       - We don't have a free completion context in the queue
       - We can't add one, as doing so would exceed the max_num_completion_contexts
         limit (all worker threads are busy)
       - We have exceeded a 1 second timeout while waiting for it
      
      In this case, the Sleep() call is unnecessary, as there is no intermittent
      failure that can be waited out, but rather than that, it's an ordinary
      situation with all workers being busy.  Presumably, calling Sleep() here
      can be even considered harmful, as it affects the fairness between the
      listeners that are blocked waiting for the completion context.
      
      So, instead of calling Sleep() just check for the possible shutdown and
      immediately retry acquiring a completion context.  If all worker threads
      are still busy, the retry will block in the same WaitForSingleObject() call,
      which is fine.
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1801639 13f79535-47bb-0310-9956-ffa450edef68
      062c97a3
    • Evgeny Kotkov's avatar
      mpm_winnt: Simplify the shutdown code that was waiting for multiple worker · 3168d3f9
      Evgeny Kotkov authored
      thread handles in batches.
      
      Starting from r1801636, there is no difference between ending the wait with
      one or multiple remaining threads.  This is because we terminate the process
      if at least one thread is still active when we hit a timeout.
      
      Therefore, instead of making an effort to evenly distribute and batch the
      handles with WaitForMultipleObjects(), we could just start from one end,
      and wait for one thread handle at a time.
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1801637 13f79535-47bb-0310-9956-ffa450edef68
      3168d3f9
    • Evgeny Kotkov's avatar
      mpm_winnt: Avoid using TerminateThread() in case the shutdown routine · 3b84b357
      Evgeny Kotkov authored
      hits a timeout while waiting for the worker threads to exit.
      
      Using TerminateThread() can have dangerous consequences such as deadlocks —
      say, if the the thread is terminated while holding a lock or a heap lock
      in the middle of HeapAlloc(), as these locks would not be released.
      Or it can corrupt the application state and cause a crash.
      
      (See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686717)
      
      Rework the code to call TerminateProcess() in the described circumstances
      and leave the cleanup to the operating system.
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1801636 13f79535-47bb-0310-9956-ffa450edef68
      3b84b357
    • Evgeny Kotkov's avatar
      mpm_winnt: Make the shutdown faster by avoiding unnecessary Sleep()'s · 1c96d681
      Evgeny Kotkov authored
      when shutting down the worker threads.
      
      Previously, the shutdown code was posting an amount of I/O completion
      packets equal to the amount of the threads blocked on the I/O completion
      port.  Then it would Sleep() until all these threads "acknowledge" the
      completion packets by decrementing the global amount of blocked threads.
      
      A better way would be to send the number of IOCP_SHUTDOWN completion
      packets equal to the total amount of threads and immediately proceed to
      the next step.  There is no need to block until the threads actually receive
      the completion, as the shutdown process includes a separate step that waits
      until the threads exit, and the new approach avoids an unnecessary delay.
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1801635 13f79535-47bb-0310-9956-ffa450edef68
      1c96d681
    • Jean-Frederic Clere's avatar
      · 4c7fa22a
      Jean-Frederic Clere authored
      Add logic to read the Upgrade header and use it in the response.
      Use we you are proxying to a server that has multiple upgrade on the same IP/Port.
      PR 61142
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1801594 13f79535-47bb-0310-9956-ffa450edef68
      4c7fa22a
  2. 10 Jul, 2017 1 commit
  3. 07 Jul, 2017 5 commits
  4. 06 Jul, 2017 1 commit
  5. 05 Jul, 2017 2 commits
  6. 04 Jul, 2017 8 commits
  7. 03 Jul, 2017 3 commits
  8. 02 Jul, 2017 2 commits
  9. 30 Jun, 2017 1 commit
  10. 29 Jun, 2017 1 commit
  11. 28 Jun, 2017 6 commits
  12. 26 Jun, 2017 4 commits
  13. 25 Jun, 2017 1 commit