books
Free Books / Computers / Practical mod_perl /

previous page: 25.2.1.4. PerlChildExitHandler
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 25.2.2.1. PerlPreConnectionHandler

25.2.2. Connection Phases




Description

This section is from the "Practical mod_perl" book, by Stas Bekman and Eric Cholet. Also available from Amazon: Practical mod_perl

Since Apache 2.0 makes it possible to implement protocols other than HTTP, the connection phases pre_connection, configured with PerlPreConnectionHandler, and process_connection, configured with PerlProcessConnectionHandler, were added. The pre_connection phase is used for runtime adjustments of things for each connection—for example, mod_ssl uses the pre_connection phase to add the SSL filters if SSLEngine On is configured, regardless of whether the protocol is HTTP, FTP, NNTP, etc. The process_connection phase is used to implement various protocols, usually those similar to HTTP. The HTTP protocol itself is handled like any other protocol; internally it runs the request handlers similar to Apache 1.3.

When a connection is issued by a client, it's first run through the PerlPreConnectionHandler and then passed to the PerlProcessConnectionHandler, which generates the response. When PerlProcessConnectionHandler is reading data from the client, it can be filtered by connection input filters. The generated response can also be filtered though connection output filters. Filters are usually used for modifying the data flowing though them, but they can be used for other purposes as well (e.g., logging interesting information). Figure 25-2 depicts the connection cycle and the data flow and highlights which handlers are available to mod_perl 2.0.

Figure 25-2

Figure 25-2. Apache 2.0 connection cycle

Now let's discuss the PerlPreConnectionHandler and PerlProcessConnectionHandler handlers in detail.

 

Continue to:

  • prev: 25.2.1.4. PerlChildExitHandler
  • Table of Contents
  • next: 25.2.2.1. PerlPreConnectionHandler

Books by Stas Bekman:















TOP
previous page: 25.2.1.4. PerlChildExitHandler
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 25.2.2.1. PerlPreConnectionHandler

Topics

  • Animals
  • Architecture
  • Arts
  • Business
  • Computers
  • Crafts
  • Fairy Tales
  • Finance
  • Flora and Plants
  • Cooking
  • Gardening
  • Health and Healing
  • History
  • Home Improvements
  • Languages
  • New Age
  • Novels
  • Real Estate
  • Reference
  • Religion
  • Science
  • Society
  • Sports
  • Travel
  • Outdoors


Search

My Books

Headaches Begone! A Systemic Approach To Healing Your Headaches
Don't Let Your Bike Seat Ruin Your Sex Life Book

Discover

  • Answers FAQ

[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007-2021 StasoSphere.com