books
Free Books / Computers / Practical mod_perl /

previous page: A.3. Redirecting POST Requests
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: A.5. Handling Cookies

A.4. Redirecting While Maintaining Environment Variables




Description

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

Let's say you have a module that sets some environment variables. Redirecting most likely tells the web browser to fetch the new page. This makes it a totally new request, so no environment variables are preserved.

However, if you're using internal_redirect( ), you can make the environment variables visible in the subprocess via subprocess_env( ). The only nuance is that the %ENV keys will be prefixed with REDIRECT_. For example, $ENV{CONTENT_LENGTH} will become:

$r->subprocess_env->{REDIRECT_CONTENT_LENGTH};

 

Continue to:

  • prev: A.3. Redirecting POST Requests
  • Table of Contents
  • next: A.5. Handling Cookies

Books by Stas Bekman:















TOP
previous page: A.3. Redirecting POST Requests
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: A.5. Handling Cookies

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