Le 30/03/2012 14:16, Rudolf Bargholz a écrit :
Goal: to automatically set the SOAPAction if empty or missing. Here what I would expect to work, but does not. <Files "nph-owscgi.exe"> SetEnvIf SOAPAction ^h.*$ HAVE_SOAPAction RequestHeader set SOAPAction "http://127.0.0.1:5912" env=!HAVE_SOAPAction </Files> What I am trying to tell Apache is, if the SOAPAction RequestHeader starts with an “h”, then set the environment variable HAVE_SOAPAction. If the environment variable HAVE_SOAPAction is not set, then set the SOAPAction ReqeustHeader to the default value of "http://127.0.0.1:5912". Tried other Unfortunately this is not working. The SOAPAction is always being overwritten, not just if empty or missing from the request headers. Any tips what I am doing wrong?
Hi Rudolf,AFAIK, SetEnvIf's first argument is supposed to be a standard header name (listed in RFC2616) or an environment variable. I'm wondering whether your SOAPAction custom header is really taken into account as an environment variable. It seems that it's not the case, so maybe you could try to set an environment variable based on your header, by using a side effect of a RewriteRule ("E" flag) and then using that variable in your test ?
Here is how I would do that: RewriteEngine on RewriteRule .* - [E=SOAPAction:%{HTTP:SOAPAction}]Then you might be able to use the SOAPAction *environment variable* which will have the same value as the SOAPAction *HTTP header*
Could you try that ? Best regards, Bruno -- - Service Hydrographique et Oceanographique de la Marine - DMGS/INF - 13, rue du Chatellier - CS 92803 - 29228 Brest Cedex 2, FRANCE - Phone: +33 2 98 22 17 49 - Email: Bruno.Treguier@xxxxxxx --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx