You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Fang Cheng <au...@yahoo.com> on 2002/08/14 05:07:22 UTC

apache + mod_perl --> chunk mode trailer

I have a problem with the HTTP response in the chunk
mode using mod_perl.


When apache sends a response in the chunk mode, the
mod_perl handler invokes the ap_send_http_header()
function in the apache src/main/http_protocol.c file,
and the r->chunked flag is set to 1 (by the
ap_keep_alive() function). However when apache calls
the ap_finalize_request_protocol() before sending
out the request, the r->chunked is 0. Indeed, all
changes that mod_perl/perl script made to request_rec
(r) does not show up there at the stage the
ap_finalize_request_protocol function was called. That
caused the
chunked content trailer was not sent to the client. 

I am running the apache on SUN unix box. The apache
version is 1.3.12 and set the (keepAlive on). The mod
perl version is 1.24. Version 1.27 also has this
problems as well.

If you do an apache code trace, set the breakpoint at 
apache_src/main/http_protocol.c function
ap_finalize_request_protocol, you will see the 
r->chunked == 0 even though it was set to be 1. You
can also use snoop to see that the trailers \0\r\n was
missing.

Is this a well known bug? Any way to solve it? Tx...


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Re: apache + mod_perl --> chunk mode trailer

Posted by Fang Cheng <au...@yahoo.com>.
What is subrequests?

It is HTTP POST request, and that invokes some perl
CGI script. No matter what CGI script it is invoking,
this problem is always there for a 200 response...

Fang

--- darren chamberlain <dl...@users.sourceforge.net>
wrote:
> * Fang Cheng <au...@yahoo.com> [2002-08-13
> 23:06]:
> > If you do an apache code trace, set the breakpoint
> at 
> > apache_src/main/http_protocol.c function
> > ap_finalize_request_protocol, you will see the 
> > r->chunked == 0 even though it was set to be 1.
> You
> > can also use snoop to see that the trailers \0\r\n
> was
> > missing.
> 
> Are you using any subrequests?
> 
> (darren)
> 
> -- 
> Laziness is often mistaken for patience.


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Re: apache + mod_perl --> chunk mode trailer

Posted by darren chamberlain <dl...@users.sourceforge.net>.
* Fang Cheng <au...@yahoo.com> [2002-08-13 23:06]:
> If you do an apache code trace, set the breakpoint at 
> apache_src/main/http_protocol.c function
> ap_finalize_request_protocol, you will see the 
> r->chunked == 0 even though it was set to be 1. You
> can also use snoop to see that the trailers \0\r\n was
> missing.

Are you using any subrequests?

(darren)

-- 
Laziness is often mistaken for patience.