A "GET" method. It's the only useful behaviour; the CGI script has no means
for supplying content.
>2) If the method should indeed be POST, where does the content come from?
>(POST requires Content-Type and Content-Length headers.)
Logically, from the script that returned the Location: header. Unfortunately,
there is currently no way to arrange that.
>3) Should there be a way for a CGI to specify the method to use with a
>redirection? If yes, only for local URLs, or for full ones, too?
You could do it for local URLs by having a Method: header, and taking
any content produced by the CGI script as input content for the redirected
request.
> 4) What environment should be passed to a CGI (like T2 above) that is
> reached via a redirection?
> (Here again, I think it should be the same as if a full URL got sent
> back to the client, and the client made a new request.)
Yes. That is what servers currently do on internal redirection. However, some
servers also pass the CGI variables for the original request prefixed by
REDIRECT_. e.g. Client requests http://foo.com/script?args
The server (perhaps because of script being a CGI script returning a
Location: /bar header) internally redirects this to the CGI script
http://foo.com/bar
then this script gets the environment variables
SCRIPT_NAME=/bar
QUERY_STRING=""
REDIRECT_SCRIPT_NAME=/script
REDIRECT_QUERY_STRING=args
David.