httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <>
Subject Make cgi unbuffered is bogus
Date Mon, 14 Jul 1997 10:14:06 GMT
>  +   *) CGI: Add a select() loop so that CGI scripts don't have to be
>  +      nph in order to be "unbuffered". [Sameer Parekh]

This one is about to be de-committed. No, it isn't salvageable.
It creates a bunch of BUFF streams assuming that the CGI script will
use them like a module, but the scripts are only going to write
directly to the file descriptor.  It then turns buffering *off*
so that it can read from the BUFF just like a normal fd.
In the procees, it also adds an indefinite block on select, doesn't
check for error conditions on bwrite (potentially losing parts of
the header fields already in the buffer), doesn't check for error
conditions on the select, performs an extra copy of all data that is
output, fails to check for the soft_timeout conditions, introduces
seven potential infinite loops where bgets replaced fgets in mod_cgi.c,
and reintroduces the problem of per-subrequest cleanups on virtual SSI.
It also duplicates a hell of a lot of ancilliary code.  All this
instead of just doing a select on the original FILE* file descriptor!

Gag me with a spoon.  -1


View raw message