How do I get "x-forwarded-for" http header attribute from msg_ctx?
The following code transport_headers is NULL. Am I doing something
wrong?
Thanks,
Ellen
/* ************************************************* */
transport_headers = axis2_msg_ctx_get_transport_headers(msg_ctx, env);
if (transport_headers)
{
axis2_http_header_t *xForwardedFor_header = NULL;
xForwardedFor_header = (axis2_http_header_t *)
axutil_hash_get(transport_headers, "x-forwarded-for",
AXIS2_HASH_KEY_STRING);
if (xForwardedFor_header)
{
axis2_char_t *xForwardedFor_value = NULL;
xForwardedFor_value =
axis2_http_header_get_value(xForwardedFor_header, env);
printf("x-forwarded-for http header = %s", xForwardedFor_value);
}
}
/* *********************************************************************** */
On Sat, Jan 10, 2009 at 3:11 AM, Supun Kamburugamuva <[email protected]> wrote:
>
> It should contain all the HTTPS headers. If not please raise a jira.
>
> Supun
>
> On Sat, Jan 10, 2009 at 1:04 AM, Ellen Chou <[email protected]> wrote:
>>
>> Hi all,
>>
>> I'm having Apache as a proxy server that forwards SOAP request to Axis2C
>> service. But I would still want to find out the IP address of the original
>> SOAP requester.
>>
>> 1) Does msg_ctx contain all the http header attributes, such as
>> X-Forwarded-For? Apparently it is not in 1.4.0.
>> 2) Is there any way I can get heep header from within axis2_svc_skeleton?
>>
>> Any help would be appreciated.
>>
>> Thanks,
>> Ellen
>
>
> --
> Software Engineer, WSO2 Inc
> http://wso2.org
> Web Services with Axis2/C http://wsaxc.blospot.com
>