mod_tee

mod_tee serves to "clone" an document as it is served. It was hacked up as a quick-and-dirty fix when a Site Valet user complained of problems saving a Valet report: mod_tee now serves to enable registered users to request email copies of any report generated.

The current status is "works for us", but it is not of release quality. It is less-than-complete in several respects. It's probably not a good idea to use it operationally unless you're prepared to get your hands dirty fixing any problems, or pay for support.

Configuration

TeeType FILE|PIPE|SMTP [Destination]
Where to send the cloned output:
  • FILE - save to a destination file. For testing only!
  • PIPE - pipes output to a destination program with popen.
  • SMTP - sends cloned output directly to email at a destination mailserver. Implements SMTP handshake with no error checking - so it's a dangerous option!
TeeCondition query|cookie|path|header|env|true|false [key] [val]
Defines a condition for mod_tee to be activated for a request. Values true and false are unconditional, while the others define a QUERY_STRING key, a Cookie, a PATH_INFO component, a request header or an environment variable to trigger the tee. Conditional values require a key. If val is defined then key must match it; otherwise any value of key will activate the tee.
TeeHeader key value
Defines an RFC822-style header to be inserted in front of the body of the page.

Availability

See caveats above. This is not production quality!

mod_tee.c source code is available under the GNU General Public License (GPL).