Apache Server configuration support - Apache Module error

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > June 2007 > Apache Module error





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Apache Module error
vincenzo.bacarella@gmail.com

2007-06-19, 7:24 pm

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!

HansH

2007-06-19, 7:24 pm

<vincenzo.bacarella@gmail.com> 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


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com