Problem
I want to retrieve value of a header in my custom Apache module. (The header is coming as part of a POST request.) I am doing this:
const char *myHeader = apr_table_get(r->headers_in, "MyHeader");
But, this is giving myHeader = NULL
.
Details
I am using the myHeader
here:
sprintf(query, query_template, myHeader, 2);
query
is formatted using query_template = "call GetDelay('%s', %d)"
and executed on the DB. DB shows the executed query as GetDelay('(null)',2)
.
How to retrieve header values? Or what is my mistake?