You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Denis Banovic <de...@ncm.at> on 2004/08/05 11:16:24 UTC
AW: [mp2] Content-Length: 0 / Location:
Hi!
I have following config:
Apache:
PerlResponseHandler ModPerl::Registry
AddHandler perl-script .pl
Perl script:
#!/usr/bin/perl
print "Location: http://www.mydomain.at\n\n";
Output with headers:
HTTP/1.1 200 OK
Connection: close
Date: Thu, 05 Aug 2004 08:59:59 GMT
Server: Apache/2.0.46 (Red Hat)
Content-Type: text/plain; charset=ISO-8859-1
Client-Date: Thu, 05 Aug 2004 08:59:45 GMT
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Location: http://www.mydomain.at
What am I doing wrong?
I just want him to make a Redirect when somebody calls my script.
I've tried PerlSendHeader Off and On, nothing helped.
Thanks
Denis
-----Ursprüngliche Nachricht-----
Von: Geoffrey Young [mailto:geoff@modperlcookbook.org]
Gesendet: Mittwoch, 4. August 2004 14:44
An: Denis Banovic
Cc: modperl@perl.apache.org
Betreff: Re: [mp2] Content-Length: 0
Denis Banovic wrote:
> Hi!
>
> I just got a new Server with apache 2.046 and mp2
>
> I have some problems when running under mod_perl, that Content-Length: 0 always shows 0 Byte
>
> When running under cgi, content length is there.
>
> Has someone had something similar?
>
> Do I have to take care of the content_length?
no, apache automatically computes the content length of the request for you
(or does not if it finds that a C-L header is not required) so you no longer
should handle this yourself.
--Geoff
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: AW: [mp2] Content-Length: 0 / Location:
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> What am I doing wrong?
>
> I just want him to make a Redirect when somebody calls my script.
>
> I've tried PerlSendHeader Off and On, nothing helped.
I don't have compat mode enabled, but
PerlOptions +ParseHeaders
worked just fine for me:
Alias /perl-bin /apache/2.0/prefork/perl-5.8.5/cgi-bin
<Location /perl-bin>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
</Location>
HTH
--Geoff
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html