You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Jon Salz <js...@mail.jsalz.net> on 2003/03/03 07:52:14 UTC
SubRequest weirdness
Sorry, I'm not sure if I've found a mod_perl bug or if I'm just doing
something wrong. Any idea why the following behavior happens?:
test1.pl is
use Apache::SubRequest;
Apache->request->lookup_uri("test2.pl")->run;
test2.pl is
print "Content-type: text/html\nSet-Cookie: foo=bar\n\nHello world!";
test2.pl works fine by itself, but when I run test1.pl, the server output
is
HTTP/1.1 200 OK
Date: Mon, 03 Mar 2003 06:48:59 GMT
Server: Apache/2.0.44 (Unix) mod_perl/1.99_08 Perl/v5.8.0 DAV/2
Connection: close
Content-Type: text/plain; charset=ISO-8859-1
Hello world!
i.e., the Content-Type and Set-Cookie in test2.pl get ignored but the
content goes through just fine. Any idea what I'm doing wrong?
Thanks,
Jon
--
----------------------------------------------------------------------
Jon Salz <jsalz at mit dot edu> http://jsalz.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: SubRequest weirdness
Posted by Stas Bekman <st...@stason.org>.
[moving this back to the users list]
Jon Salz wrote:
> Sorry, I'm not sure if I've found a mod_perl bug or if I'm just doing
> something wrong. Any idea why the following behavior happens?:
>
> test1.pl is
>
> use Apache::SubRequest;
> Apache->request->lookup_uri("test2.pl")->run;
>
> test2.pl is
>
> print "Content-type: text/html\nSet-Cookie: foo=bar\n\nHello world!";
>
> test2.pl works fine by itself, but when I run test1.pl, the server output
> is
>
> HTTP/1.1 200 OK
> Date: Mon, 03 Mar 2003 06:48:59 GMT
> Server: Apache/2.0.44 (Unix) mod_perl/1.99_08 Perl/v5.8.0 DAV/2
> Connection: close
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello world!
>
> i.e., the Content-Type and Set-Cookie in test2.pl get ignored but the
> content goes through just fine. Any idea what I'm doing wrong?
This doesn't seem to work with mp1 as well. So I doubt it's a bug in mp2.
in mp1 test.pl doesn't send headers at all:
telnet localhost 8000
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
GET /perl/callsubreq.pl HTTP/1.0
Hello world!Connection closed by foreign host.
The eagle book says that the headers should be forwarded, but they aren't.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com