You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <jw...@virginia.edu> on 2002/07/02 19:10:42 UTC
Re: viewcvs shorting out?
On 2 Jul 2002, Jeff Trawick wrote:
> Go Ask! In a simple test with a crude client, I got Content-Length:
> 16369 for that main page. But after removing the headers:
>
> -rw-rw-r-- 1 trawick trawick 27257 Jul 2 12:13 out
Heh, ask and ye shall receive I suppose. :-) Thanks Jeff. Now the
question is why -- was this for /viewcvs/ or /viewcvs.cgi/ or both? If
just /viewcvs/, then mod_negotiation might be implicated. If both, then I
suppose mod_cgi is implicated. Anyway, I'm going to move this off to the
developers list.
--Cliff
Re: viewcvs shorting out?
Posted by Cliff Woolley <jw...@virginia.edu>.
On Tue, 2 Jul 2002, Justin Erenkrantz wrote:
> Fix forthcoming (we're discussing alternatives on IRC now). -- justin
The results of said conversation:
Index: protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
retrieving revision 1.107
diff -u -d -r1.107 protocol.c
--- protocol.c 26 Jun 2002 19:45:07 -0000 1.107
+++ protocol.c 2 Jul 2002 23:44:54 -0000
@@ -1199,12 +1199,14 @@
split = NULL;
flush = 0;
- APR_BRIGADE_FOREACH(e, b) {
+ e = APR_BRIGADE_FIRST(b);
+ while (e != APR_BRIGADE_SENTINEL(b)) {
const char *ignored;
apr_size_t len;
len = 0;
if (APR_BUCKET_IS_EOS(e)) {
eos = 1;
+ break;
}
else if (APR_BUCKET_IS_FLUSH(e)) {
if (partial_send_okay) {
@@ -1241,6 +1243,7 @@
flush = 1;
break;
}
+ continue;
}
else if (rv != APR_EOF) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
@@ -1255,6 +1258,7 @@
ctx->curr_len += len;
r->bytes_sent += len;
+ e = APR_BUCKET_NEXT(e);
}
if (split) {
The key part to notice here is that when we get APR_EAGAIN from
apr_bucket_read(), we were failing to ever read from that bucket again
because of the APR_BRIGADE_FOREACH.
--Cliff
Re: viewcvs shorting out?
Posted by Justin Erenkrantz <je...@apache.org>.
On Tue, Jul 02, 2002 at 02:12:38PM -0400, Jeff Trawick wrote:
> Cliff Woolley <jw...@virginia.edu> writes:
>
> > On 2 Jul 2002, Jeff Trawick wrote:
> >
> > > Go Ask! In a simple test with a crude client, I got Content-Length:
> > > 16369 for that main page. But after removing the headers:
> > >
> > > -rw-rw-r-- 1 trawick trawick 27257 Jul 2 12:13 out
This is because we're doing a HTTP/1.0 request and we're not handling
the EAGAIN case on the pipe bucket right. (partial_send_okay is 0 in
ap_content_length_filter.)
This'll work okay when using HTTP/1.1.
Fix forthcoming (we're discussing alternatives on IRC now). -- justin
Re: viewcvs shorting out?
Posted by Jeff Trawick <tr...@attglobal.net>.
Cliff Woolley <jw...@virginia.edu> writes:
> On 2 Jul 2002, Jeff Trawick wrote:
>
> > Go Ask! In a simple test with a crude client, I got Content-Length:
> > 16369 for that main page. But after removing the headers:
> >
> > -rw-rw-r-- 1 trawick trawick 27257 Jul 2 12:13 out
>
> Heh, ask and ye shall receive I suppose. :-) Thanks Jeff. Now the
> question is why -- was this for /viewcvs/ or /viewcvs.cgi/ or both? If
> just /viewcvs/, then mod_negotiation might be implicated. If both, then I
> suppose mod_cgi is implicated. Anyway, I'm going to move this off to the
> developers list.
This was for a request to /viewcvs.cgi/ (with trailing slash; without
trailing slash I get 301 back).
--
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...