Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-21-2008, 09:02 PM   #1
Registered: Feb 2005
Distribution: Ubuntu, Debian
Posts: 56

Rep: Reputation: 15
Exclamation Apache Modules!

Heya LQ, it's been almost a year since I've been on here, but I've got a question!!

I'm writing a module for Apache 2.2, and I'm able to get the module loading correctly and modifying the response content.. That part is all good - but! I have to check the content type, the URI etc to check whether I should be transforming said resource or leave it alone.

The problem is, in my output filter which takes "ap_filter_t *f", f->r is of type request_rec with the information about the request... However, f->r->headers_in and headers_out, uri, unparsed_uri, parsed_uri and all the useful stuff is null!! f->r->args is not null and I can use ap_get_server_name() to get the virtual host and concatenate it with args to get the URI but I also need f->r->content_type, and that's null too...

In all the modules I've looked at (eg mod_deflate.c in the Apache source) and numerous other examples, there's absolutely no hint to what they're doing to be able to obtain the data from these structs.

My question: Does anyone out there know why these values are null, or if there's another handler/filter that populates these values, or a flag I have to set? I can't be the only one in the world with this problem, so if anyone's ever had a similar issue, please let me know how you got on!

Cheers all,

EDIT: Issue resolved (problem with libapr headers and the size of apr_off_t)

Last edited by nevelis; 10-22-2008 at 07:33 PM.


apache, filter, output

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache modules ittec Linux - Software 3 06-20-2008 08:01 AM
LXer: Developing Modules for Apache - The Apache Module Book LXer Syndicated Linux News 0 05-11-2007 09:01 PM
Looking for apache modules dominant Linux - Newbie 2 07-21-2004 02:26 AM
Where are my apache-2.0.48 modules tharris Linux - Software 1 02-23-2004 06:06 PM
Apache Modules raptor Linux - Software 0 08-26-2003 02:49 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration