Ahh, very interesting.
I actually did want to use a full url with scheme and host.
What we wanted was a response of type HTTP_UNAUTHORIZED with a Location header
as well as the other headers I added.
But, perhaps that's not a reasonable thing to want, and we can provide a URI to
a page on the
On Saturday, May 28, 2011 21:10:14 Matisse Enzer wrote:
> $r->custom_response( HTTP_UNAUTHORIZED, $uri );
> return HTTP_UNAUTHORIZED
Make sure $uri does not contain the hostport part. It must start with a
slash. The next lines are from modules/http/http_request.c:
/*
* Two types
Using Apache/2.2.17 mod_perl/2.0.5.
We have a PerlAuthenHandler that (on failure to authenticate) sets two headers
('Set-Cookie' and 'WWW-Authenticate' and returns HTTP_UNAUTHORIZED. We also use
$r->custom_response to set a URL as the response body.
What I expect Apache to send to the client is
Thank you.
May I suggest a slight improvement in the online doc at
http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_content_type_
then, to add this explicitly ?
Currently, it says :
quote
content_type
Get/set the HTTP response Content-type header value.
my $content_type =
Yes!
- Original Message
> From: André Warnier
> To: mod_perl list
> Sent: Sat, May 28, 2011 8:23:34 AM
> Subject: How to set Content-type properly
>
> Hi.
>
> I am using :
> Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_jk/1.2.26 PHP/5.2.6-1+lenny9 with
>Suhosin-Patch mod_ssl/2.2.9 Op
Hi.
I am using :
Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_jk/1.2.26 PHP/5.2.6-1+lenny9 with Suhosin-Patch
mod_ssl/2.2.9 OpenSSL/0.9.8g mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0
In a PerlResponseHandler, I am using Template-Toolkit to generate html pages sent back to
the browser.