Re: a test result

Shel Kaphan (
Wed, 9 Aug 1995 10:45:00 -0700 writes:
> Shel Kaphan said:
> >
> > As it turns out, using the NCSA server (v 1.3) there is apparently no
> > way for a CGI program to return the Location header with a 2xx status.
> First, that statement is untrue. Secondly, this is a feature not a bug.

Less Filling! Tastes Great! Yes, you can do this with the nph-*
thing, of which I was unaware until yesterday. But in what sense is
it a feature for things to work this way? You can use the Location
directive by itself to issue a redirect. Nothing I suggested would
change this. The question is what happens when you want a Location
header in the response as well as a 2xx return code. Having to bypass
all server-inserted headers by using the nph kluge is a bit
unfortunate, that's all. What is so unreasonable about wanting the
Status server directive to be obeyed in all cases?

> > If you generate a Location header, the server forces 302 status.
> Yes. That is what outputting the string Location: is supposed to do; it
> lets you issue a redirect from a program, without the hassle of creating
> all your own headers yourself.
Ah, so you agree having to generate all your own headers is a hassle.

> > Sounds like a patch is needed. (maybe there are newer versions that
> > already have this fixed?)
> No, and no. Suppose this was patched. How would you ever issue a redirect?

Same as now: by using the Location directive without an overriding Status
directive. BTW, the Netscape server works as I suggest right this
very minute. If you use a Location directive but no Status directive,
it defaults to 302. Use a Status directive too, and it believes you.
How terribly controversial!

> You would have to generate all your own headers. Imagemap would stop
> working. Etc.


> So here is the impossible program. As you can see it is not complicated:

I'm suitably impressed. You knew about something I didn't: this
incredible nph thing.