Apache Module error

This is a discussion on Apache Module error within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, we are trying to create an apache module which catch web requests and does evaluation of the content_type string. ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-19-2007
vincenzo.bacarella@gmail.com
 
Posts: n/a
Default Apache Module error

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!

  #2 (permalink)  
Old 06-20-2007
HansH
 
Posts: n/a
Default Re: Apache Module error

<vincenzo.bacarella@gmail.com> schreef in bericht
news:1182290670.143458.216780@c77g2000hse.googlegr oups.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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:16 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0