[mod_python] Sending headers

Chris Jackson christopher.jackson at gmail.com
Tue Feb 15 17:18:14 EST 2005


Is there a mod_python equivalent of sending headers such as this PHP
example using a header() method:

<?php
  if (!isset($_SERVER['PHP_AUTH_USER'])) {
   header('WWW-Authenticate: Basic realm="My Realm"');
   header('HTTP/1.0 401 Unauthorized');
   echo 'Text to send if user hits Cancel button';
   exit;
.....
http://us2.php.net/manual/en/features.http-auth.php

~= Chris =~


More information about the Mod_python mailing list