|
Posted by Alan J. Flavell on 08/29/05 12:36
On Sun, 28 Aug 2005, Toby Inkster wrote:
> Alan J. Flavell wrote:
> >> It's inefficient. It spawns a whole new process for each page request.
> >
> > It's often implemented in that way, but where does the specification
> > require that?
>
> From your own reference (RFC 3875):
>
> The server acts as an application gateway. It receives the request
> from the client, selects a CGI script to handle the request, converts
> the client request to a CGI request, *executes the script* and converts
> the CGI response into a response for the client.
>
> (my emphasis). The RFC specifies that the server should run an external
> application
Yes, but that doesn't mandate running it by a particular mechanism, i.e
your particular operating system's mechanism for spawning a new process.
Depending on OS, there may be more-efficient (though less-portable and
potentionally more-troublesome) ways of doing it more efficiently, that
get used in practice to speed things up, without changing the fact that
the API is still the defined CGI. Sure, as you say, there are other
approaches, too.
> (which it regretably refers to as a "script" even though this
> application may be a compiled binary).
It's a commonly-used terminology in this context, unfortunately, and even
finds itself used in the actual API, e.g the meta-variable SCRIPT_NAME.
I too favour the precise use of language, which this is not; but at least
the RFC makes a half-hearted attempt to define its usage of the term
"script" in its terminology section, i.e section 1.4. I'm afraid railing
against this usage now is too late, and wasted effort.
all the best
Navigation:
[Reply to this message]
|