Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

Missing headers for small requests?

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


coar at decus

Jun 12, 1997, 2:57 AM

Post #1 of 10 (1318 views)
Permalink
Missing headers for small requests?

Currently, Apache won't emit some (e.g., Content-length) headers in the
response if it's chunked or dynamic - I assume in both cases because
we don't think we'll know the final size of what we're sending.
Just out of curiousity (Roy?), would it be appropriate to change
this behaviour if the entire response fit into a single reply chunk
(i.e., we *did* know the total size quite early)? In other words,
if we know the complete size before the headers are sent, should we
add [at least] Content-length?

I don't know where the break-even point would be for reply buffer
size (Dean?), or whether it's even worth pursuing. Just something
that crossed my mind wrt things like SSI documents, particularly
small ones..

#ken :-)}


dgaudet at arctic

Jun 12, 1997, 10:35 AM

Post #2 of 10 (1292 views)
Permalink
Re: Missing headers for small requests? [In reply to]

It's been proposed several times. But needs a revamp of the i/o system to
do it... hey can we agree that we want to use sfio? If so then someone
can get working on integrating sfio.

Dean

On Thu, 12 Jun 1997, Rodent of Unusual Size wrote:

> Currently, Apache won't emit some (e.g., Content-length) headers in the
> response if it's chunked or dynamic - I assume in both cases because
> we don't think we'll know the final size of what we're sending.
> Just out of curiousity (Roy?), would it be appropriate to change
> this behaviour if the entire response fit into a single reply chunk
> (i.e., we *did* know the total size quite early)? In other words,
> if we know the complete size before the headers are sent, should we
> add [at least] Content-length?
>
> I don't know where the break-even point would be for reply buffer
> size (Dean?), or whether it's even worth pursuing. Just something
> that crossed my mind wrt things like SSI documents, particularly
> small ones..
>
> #ken :-)}
>


akosut at nueva

Jun 12, 1997, 2:11 PM

Post #3 of 10 (1284 views)
Permalink
Re: Missing headers for small requests? [In reply to]

On Thu, 12 Jun 1997, Dean Gaudet wrote:

> It's been proposed several times. But needs a revamp of the i/o system to
> do it... hey can we agree that we want to use sfio? If so then someone
> can get working on integrating sfio.

It's always been my plan to integrate an IO package like sfio into
Apache 2.0. However, is sfio itself the best choice? While I've not
heard anything specific (nor have I checked specifically), I've heard
random things in passing that seem to indicate there are problems with
sfio. RST used sfio in an early apache-XX, then switched over to
bstdio.

As for the particular question - it's illegal (HTTP/1.1) to send
Content-length with a chunked output. However, it might be a good idea
to buffer a few k before outputting, so we can tack on a
Content-length. The CERN httpd did that. But given that we have
chunking, I don't know if it should be a high priority.

--
________________________________________________________________________
Alexei Kosut <akosut [at] nueva> The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/ http://www.apache.org/


jim at jaguNET

Jun 12, 1997, 3:37 PM

Post #4 of 10 (1292 views)
Permalink
Re: Missing headers for small requests? [In reply to]



randy at zyzzyva

Jun 12, 1997, 6:57 PM

Post #5 of 10 (1283 views)
Permalink
Re: Missing headers for small requests? [In reply to]

> Alexei Kosut wrote:
> >
> > On Thu, 12 Jun 1997, Dean Gaudet wrote:
> >
> > > It's been proposed several times. But needs a revamp of the i/o system to
> > > do it... hey can we agree that we want to use sfio? If so then someone
> > > can get working on integrating sfio.
> >
> > It's always been my plan to integrate an IO package like sfio into
> > Apache 2.0. However, is sfio itself the best choice? While I've not
> > heard anything specific (nor have I checked specifically), I've heard
> > random things in passing that seem to indicate there are problems with
> > sfio. RST used sfio in an early apache-XX, then switched over to
> > bstdio.
> >
>
> I think RSTs reason for the switch was the bstdio was more portable
> than sfio, esp when one considers the configuration tool ('iff'?)
> used to do the initial configs. Also, bstdio seemed a LOT faster.
> I think that the sfio/bstdio/whatever debate is still up in air.
> The consensus is that we need our our stdio routines, but not which
> is best.

[Still digging through the backlog]

Not sure if this has been mentioned, but the fact that Perl 5.004
now has an sfio option would make me lean toward using that if we
can to reduce redundant code.


jim at jaguNET

Jun 13, 1997, 5:42 AM

Post #6 of 10 (1265 views)
Permalink
Re: Missing headers for small requests? [In reply to]



randy at zyzzyva

Jun 13, 1997, 8:02 AM

Post #7 of 10 (1297 views)
Permalink
Re: Missing headers for small requests? [In reply to]

> Randy Terbush wrote:
>
> > [Still digging through the backlog]
> >
> > Not sure if this has been mentioned, but the fact that Perl 5.004
> > now has an sfio option would make me lean toward using that if we
> > can to reduce redundant code.
> >
>
> Does the sfio-stuff work in Perl? The docs seem to suggest it very
> experimental at this point (Perl's IO abstraction)

From what I am reading in the mod_perl discussions, I assume that
it does. Doug or Rob should probably comment on it's stability.


> --
> ====================================================================
> Jim Jagielski | jaguNET Access Services
> jim [at] jaguNET | http://www.jaguNET.com/
> "Look at me! I'm wearing a cardboard belt!"


dougm at opengroup

Jun 13, 1997, 8:47 AM

Post #8 of 10 (1271 views)
Permalink
Re: sfio (was: Missing headers for small requests? ) [In reply to]

Randy Terbush <randy [at] zyzzyva> wrote:

> > Randy Terbush wrote:
> >
> > > [Still digging through the backlog]
> > >
> > > Not sure if this has been mentioned, but the fact that Perl 5.004
> > > now has an sfio option would make me lean toward using that if we
> > > can to reduce redundant code.
> > >
> >
> > Does the sfio-stuff work in Perl? The docs seem to suggest it very
> > experimental at this point (Perl's IO abstraction)
>
> >From what I am reading in the mod_perl discussions, I assume that
> it does. Doug or Rob should probably comment on it's stability.

From what I've seen the sfio/Perl combo is quite stable. mod_perl
uses sfio to hook up STDIN and STDOUT to the client, so perl's
built-in print() and read() functions work as they do under CGI. This
is no longer required as gaps in tie'd filehandles were filled in
before 5.004. sifo-enabled Perl is a requirement for mod_fastcgi.
Between the two, over the past several months I've seen/heard from
people running it on many flavors of unix without any troubles. There
were are few people who had build troubles with "sfio-oct95", but
those seem to have gone away with "sfio97".

A while back I put this together, which is derived from PerlIO:
http://www.osf.org/~dougm/apache-2.0/apacheio.html

The basic idea is all the b*() functions are replaced by ApacheIO_
macros (that look like functions). And r->connection->client is made
opaque with ApacheIO* instead of BUFF*, again another #define. The
idea was, at configure time, -DUSE_APACHE_FOO would bootstrap the
underlying i/o system via these ApacheIO_ defines. The default being
the current buff mechansim, other options include sfio. This was nice
for me, since I didn't have to lay a finger on buff.c. After talking
with Alexi and looking closer at buff.c, I see no reason not to tie
sfio directly into the current buff mechanism, which should actually
be less work. The question is, should sfio be a requirement or an
option?

This is another piece needed for DCE, i/o needs to pass thru the RPC
interface, not the socket connection that is normally established. I'm
actually experimenting with an sfio-enabled apache as we speak. The
basic idea is, the lowest-level read and write calls in buff.c
are replaced with sfread and sfwrite. By default, the input and output
streams are tied the `ApacheSFIO_t' discipline which hooks back into the
current low-level saferead/read, bwrite/writev/write, etc. The dce
module can pop this discipline off the stack, change the read/write
function pointers to the rpc interface, then push it back. I have not
experimented with more than one discipline on either stack, but when I
do, I'll share my experience.

-Doug


jim at jaguNET

Jun 13, 1997, 9:32 AM

Post #9 of 10 (1253 views)
Permalink
Re: sfio (was: Missing headers for small requests? ) [In reply to]



dgaudet at arctic

Jun 13, 1997, 10:05 AM

Post #10 of 10 (1276 views)
Permalink
Re: sfio (was: Missing headers for small requests? ) [In reply to]

On Fri, 13 Jun 1997, Doug MacEachern wrote:
> After talking
> with Alexi and looking closer at buff.c, I see no reason not to tie
> sfio directly into the current buff mechanism, which should actually
> be less work. The question is, should sfio be a requirement or an
> option?

In my opinion it should be a requirement.

There are some subtle semantics in buff.c that we need to get right in
sfio as well. In particular the B_SAFEREAD semantics are necessary in
the lowest layer that writes on the socket. buff.c also does chunking
which is definately better expressed as a layer.

I guess it doesn't have to be a requirement though... but I want sfio
for input as well, at least if I understand it correctly. I want it to
replace all the FILE * stuff because stdio is just lame. send_fd should
be able to do mmap() flipping of data without userspace copying... I wonder
how easy that is in sfio.

Dean

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.