From: Rob McCool
Newsgroups: netscape.devs-nsapi
Subject: Re: grab send-cgi output? pipe service functions?
Date: Wed, 13 Nov 1996 18:13:36 -0800
> I have another interesting problem, which is:
>
> What if I want to add my environment variables to the cgi environment.
> Can I pass these in a pblock or something to send-cgi? Is this possible
> at all?
If you insert a new entry into Request->headers, called foo, then you'll
get an environment variable called "HTTP_FOO" in your CGI program.
Be sure you free any foo entry that might have been there already to
make sure that a browser doesn't send one that might interfere with
your program.
> Or will I just have to be on the list of "programmers who need send-cgi
> source.'.
>
> Of course, if you do post the source to send-cgi, you'll have all sorts
> of interesting problems. What if you guys add more environment
> variables? What if you find a bug (or many) in send-cgi? What if you
> decide to rearchitect the way cgi works, but still retain the same
> signature for send-cgi? If people use the source, they won't be able to
> take advantage of new features or bug fixes without pasting in a new
> send-cgi function and possibly merging in changes.
>
> But, it could be the case that this function is really REALLY simple and
> you can safely post the code without any of these problems being much of
> a factor.
>
> But, if it is really complicated, you should consider all the features
> requested and "do the right thing". Which I assume is allowing people to
> configure the cgi environment however they wish, and allow passing in of
> a file descriptor or something that can be used to store the results, or
> even process the results as it comes out.
We're considering all of these issues. Changing the environment
variables does seem to be the primary requirement from developers in
this area, so it might be possible to meet that requirement by
providing a new hook that is called when send-cgi is creating the
environment instead of giving everyone the source code.
--Rob
--
Rob McCool, robm@netscape.com http://home.netscape.com/people/robm/
Stunt Programmer, Netscape Communications Corporation
It was working ten minutes ago, I swear...
Reproduced by permission of the author.