Hi, It seems to me that $r->content-type is for what your server sends to the client, which is probably undef in the Fixup stage, where you test it.
You probaly meant to test for the $ct = $r->header_in("Content-type") if you wanted to see whats requested from the client. Anyway, as Christopher pointed out you can get the "what's before" load off your shoulders ;-) HTH, Lian Sebe, M.Sc. Freelance Analyst-Programmer www.programEz.net > -----Original Message----- > From: Xavier Noria [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 06, 2003 9:40 PM > To: [EMAIL PROTECTED] > Subject: Re: help on setting up a PerlFixupHandler > > > On Wednesday 06 August 2003 20:26, Christopher Grau wrote: > > > On Wed, Aug 06, 2003 at 08:24:30PM +0200, Xavier Noria wrote: > > > To fix that, is it safe to change the test to > > > > > > defined $r->content_type and $r->content_type ne 'text/html'; > > > > > > or is there a better way? > > > > I usually don't concern myself with the previous content type when > > writing <Location>-based content handlers. My output is always > > "text/html" anyway. Would it be safe in your application to just > > leave it out completely? > > Hmmm, you are right, now that I think about it /admin will only > serve HTML and since I don't understand that undef I'll remove > that line altogether, the "test" is performed by <Location> anyway. > > Now that I understand what happens I will try to figure out in the > docs when $r->content_type returns something. > > Thank you very much to all, I was somewhat stuck with this. > > -- fxn >