You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tushar Joshi <tj...@turtle.net> on 2010/01/02 12:42:10 UTC

Re: [users@httpd] Getting HTTP Headers from CGI program

On Thu, Dec 31, 2009 at 06:45:51PM +0000, Nick Kew wrote:
> 
> On 31 Dec 2009, at 17:31, Tushar Joshi wrote:
> > 
> > Right bottom posting this time. I've looked in the manual searched on the web but I presume there isn't an easy way. I've looked at mod header and set env and I don't really want to add a perl wrapper to a lovely C program. I was hoping I could do something like getenv("HEADERS_REMAINING") or I could write an apache module to grab the SOAPAction header and set it in an environment variable.
> 
> If SOAPAction is an HTTP header, I suggest looking at the CGI spec
> (which is very, very simple) for how to get it.
> 

I've had a look and SOAPAction seems to be an extension maybe of some
sort as listed here

http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383528

It just doesn't seem like apache has a way of getting the value of this
header easily. I've had a look at using mod_header/setenvif but I'm
hoping to have about 100 different values for SOAPAction. It seems I can
write an apache module to maybe do this:

HTTPHeader SOAPAction 

Which will convert the SOAPAction header to an environment variable 
HTTPHeader_SOAPAction and maybe the prefix can be defined as well. 

Tushar

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Getting HTTP Headers from CGI program

Posted by Eric Covener <co...@gmail.com>.
On Sat, Jan 2, 2010 at 6:42 AM, Tushar Joshi <tj...@turtle.net> wrote:

> I've had a look and SOAPAction seems to be an extension maybe of some
> sort as listed here
>
> http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383528
>
> It just doesn't seem like apache has a way of getting the value of this
> header easily.

The CGI spec Nick is pointing you to says arbitrary headers are
already available in the env as HTTP_$headername.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org