Apache Module error

Apache Module error

am 20.06.2007 00:04:30 von vincenzo.bacarella

Hi,

we are trying to create an apache module which catch web requests and
does evaluation of the content_type string.

Here a snippet:

.....
char *type = ap_table_get(r->headers_in, "Content-Type");
char *posizione = strstr(type,"html");
.....

....but when we evaluate posizione....

if (posizione == NULL) return OK;

I get a blank page with header RESPONSE: HTTP/0.9 200 OK - probably
there is a runtime error. I am a newbie in Apache Modules, please let
me know where is the error.

Thanks!

Re: Apache Module error

am 20.06.2007 01:22:57 von HansH

schreef in bericht
news:1182290670.143458.216780@c77g2000hse.googlegroups.com.. .
> we are trying to create an apache module which catch web requests and
> does evaluation of the content_type string.
>
> Here a snippet:
>
> ....
> char *type = ap_table_get(r->headers_in, "Content-Type");
> char *posizione = strstr(type,"html");
> ....
Content-Type is a _response_ header not a _request_ header.
The related request header is Accept

HansH