Skip to content
  1. Oct 16, 2008
    • Chris Darroch's avatar
      Prior to authn/z refactoring in r368027, if authorization Require · 65d1ef00
      Chris Darroch authored
      directives had no matching AuthType and associated authentication
      directives, requests would generally fall through in the
      check_user_id hook to mod_authn_default.c's authentication_no_user()
      handler, which returned DECLINED if ap_auth_type() was not set.
      The ap_process_request_internal() function in request.c would handle
      this case by logging an "AuthType not set!" error and returning
      HTTP_INTERNAL_SERVER_ERROR.
      
      The refactoring removes this error handling in request.c, so
      individual modules will need to test for a lack of authentication,
      as necessary.  Since some modules such as mod_authz_host.c support
      Require directives that do not need any authentication, the
      mod_authn_default.c handler no longer returns DECLINED if ap_auth_type()
      is not set.  (Also, mod_authn_default can be compiled out with
      --disable-authn-default, so it can't be relied upon to exist.)
      
      Since r->user may now be NULL, individual handlers must test for that
      case when necessary.  Otherwise, most Require directives in the
      absence of AuthType directives cause handlers to crash while performing
      strcmp() and friends on a NULL r->user value.
      
      NOTE: I can't test mod_authnz_ldap.c myself, so I'm not sure if it
      needs similar fixes.  On the one hand, a NULL r->user in the authz
      handlers always generates a log message.  However, it appears that
      authn_ldap_build_filter() will sometimes then be called, perform no
      action, which may result in a possibly uninitialized filtbuf buffer
      being passed to util_ldap_cache_getuserdn().  I don't know if that
      could cause problems in the LDAP cache code.  If someone familiar with
      LDAP authz could take a look, that would be much appreciated.
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@705361 13f79535-47bb-0310-9956-ffa450edef68
      65d1ef00
    • Mads Toftum's avatar
      Make text match example. · dcfe1982
      Mads Toftum authored
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@705198 13f79535-47bb-0310-9956-ffa450edef68
      dcfe1982
    • Tony Stevenson's avatar
      df36364c
    • Tony Stevenson's avatar
      76c67153
  2. Oct 15, 2008
  3. Oct 14, 2008
  4. Oct 13, 2008
  5. Oct 12, 2008
  6. Oct 11, 2008
  7. Oct 10, 2008
  8. Oct 09, 2008
  9. Oct 08, 2008
  10. Oct 07, 2008
  11. Oct 04, 2008
  12. Sep 27, 2008
  13. Sep 26, 2008
  14. Sep 24, 2008
  15. Sep 23, 2008
  16. Sep 20, 2008
    • Paul Querna's avatar
      3ea1f8f2
    • Jim Jagielski's avatar
      For timeouts, behave as before and not drop. · 4baa3df3
      Jim Jagielski authored
      From Adam Woodworth <mirkperl gmail.com>
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697362 13f79535-47bb-0310-9956-ffa450edef68
      4baa3df3
    • Paul Querna's avatar
      Introduce Suspendable Requests to the Event MPM. · 968f3150
      Paul Querna authored
      Using this basic framework, you can return SUSPENDED from an HTTP Handler,
      and then register a callback that is invoked by the MPM at a later time.
      
      This initial version only supports _timers_ as callbacks, but in the future I
      would like to add things like wait for socket activity, on a socket specified by
      the handler.
      
      Once in a callback, It is then the responsibility of the callback fucntion 
      to finish the HTTP Request handling, but this alows you to do cool things like 
      a fully async proxy, COMET support, or even rate limiting.
      
      To prove I'm not insane, I've inlcuded an example module, mod_dialup.
      
      You can configure it like this:
      <Location "/docs">
        ModemStandard "V.32"
      </Location>
      
      And for static files inside that path, you will be rate limited to V.32 speeds, 
      aka 9.6 kilobits/second.
      
      Does anyone besides Rüdiger read commit emails :-) ?
      
      I know there are likely huge problems with this, but I would like to see how far
      we can push the Event MPM, figure out what to do better, if there is anything, 
      and then really dive into the 3.0 development before ApacheCon.
      
      * server/mpm/experimental/event/fdqueue.h:
          (timer_event_t): New structure to hold timer events and callback functions.
          
      * server/mpm/experimental/event/fdqueue.c
          (ap_queue_empty): Modify to also look at Timer Ring.
      
          (ap_queue_init): Initialize Timer Ring.
      
          (ap_queue_push_timer): New function, pushes a timer event into the queue.
      
          (ap_queue_pop_something): Renamed function, returns a timer event or
              a socket/pool for a worker thread to run.
      
      
      * server/mpm/experimental/event/event.c
          (process_socket): If the connection is in SUSPENDED state, don't force it
              into linger mode yet, the callback will have to take care of that.
      
          (push_timer2worker): New shortcut function, pushes timer event into queue
              for a worker to run.
      
          (timer_free_ring): New global data structure to recycle memory used by 
              timer events.
      
          (timer_ring): New global data structure to hold active timer events.
      
          (g_timer_ring_mtx): Thread mutex to protect timer event data structures.
      
          (ap_mpm_register_timed_callback): New Function, registers a callback to be
              invoked by the MPM at a later time.
      
          (listener_thread): Calculate our wakeup time based on the upcoming Event 
              Queue, and after pollset_poll runs, push any Timers that have passed
              onto worker threads to run.
          
          (worker_thread): Call new queue pop method, and if the Timer Event is 
              non-null, invoke the callback.  Once the callback is done, push the
              structure onto the timer_free_ring, to be recycled.
      
          (child_main): Initialize new mutex and ring structures.
      
      
      * server/config.c
          (ap_invoke_handler): Allow SUSPENDED aa valid return code from handlers.
      
      
      * modules/http/http_core.c
          (ap_process_http_async_connection): Don't close the connection when in 
              SUSPENDED state.
      
      
      * modules/http/http_request.c
          (ap_process_request_after_handler): New function, body pulled from the old,
              ap_process_async_request.  Split to let handlers invoke this so they 
              don't need to know all of the details of finishing a request.
      
          (ap_process_async_request): If the handler returns SUSPENDED, don't do
              anything but return.
      
      
      * include/ap_mmn.h: Bump MMN.
      
      
      * include/ap_mpm.h
          (ap_mpm_register_timed_callback): New function.
      
      
      * include/httpd.h:
          (SUSPENDED): New return code for handlers.
          (request_rec::invoke_mtx): New mutex to protect callback invokcations
              from being run before the original handler finishes running.
          (conn_state_e): Add a suspended state.
      
      
      * include/http_request.h
          (ap_process_request_after_handler): New function to make it easier for 
              handlers to finish the HTTP Request.
      
      
      * modules/test/config.m4: Add mod_dialup to build.
      
      
      * modules/test/mod_dialup.c: New rate limiting module, requires the Event MPM 
          to work.
      
      
      
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697357 13f79535-47bb-0310-9956-ffa450edef68
      968f3150
  17. Sep 19, 2008