in reply to Re^2: Changing http headers in cgi response
in thread Changing http headers in cgi response
I think you might be unclear what 202 means(?). It's not for "content" at all. It's for saying, "I got your request and I'll look into it and let you know; maybe here's a link or something you so you can check back when I'm ready with what you actually asked for."
You are trying to overload your web server to behave as your dispatcher. Don't do it. Use proper dispatch and server configuration. Here is an example (untested—pasted from a web sample—and might need correction) configuration for apache to point to a script (fastcgi in this case but CGI should work too)-
RewriteEngine On RewriteRule ^(/somedir/dispatch\.fcgi/.*)$ - [L] RewriteRule ^(.*)$ somedir/dispatch.fcgi/$1 [PT,L]
Then you can use the request URI (everything in the path after the script's name) inside your (F)CGI to do the things you're talking about wanting to do while returning proper status codes to match.
|
|---|