httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mickg <mi...@mickg.net>
Subject Re: [users@httpd] Question about mod_charset_light and mod_proxy_html (Solved!)
Date Wed, 08 Nov 2006 19:36:26 GMT
Nick Kew wrote:
> On Wed, 08 Nov 2006 12:56:28 -0500
> mickg <mickg@mickg.net> wrote:
> 
> 
>> Do you want the full working code once I clean up the memory problem?
>> It is, after all, GPL, so it would be in good spirit for me to release
>> the modified source. :)
> 
> Yes please.
> 
> I haven't thought through whether to incorporate this or something
> similar.  If I do, I'll want to base it on apr_iconv, rather than
> native iconv.  But having your code there to look at can't hurt,
> regardless of what I end up doing.
> 
Attached.
Code compiles on Ubuntu, assuming apache-dev, libxml2-dev, and a
	ln -s /usr/include/libxml2/libxml /usr/include/libxml

apxs2 -i -c mod_proxy_html.c
No warnings on the new functions are emitted.

I am now using it on a webserver, and will say tomorrow whether there
are any major memory leaks (A decent amount of traffic is going through
it).

Essential Missing:
Rewriting of get & post request data.

The reason for using iconv, and not apache's iconv:
libxml already opens the iconv handle during initialization.
Might as well use it.

Standard discalimers apply.
Code is GPL, my modifications are, for WebThing's use, BSDed.

TODO list:
Add rewriting of POST/GET requests.
Add directive to set default encoding if non availible
	(once I figure out how to add directives).
Add directive to set output encoding (and convert to it)
	(once I figure out how to modify data post-processing)

Maybe make a mod_charset_libxml charset converter.
As the mod_charset_light is not working, and I am not sure I want to fix that.


(
  For the record, *why oh why* are we doing text munging in C/C++ ?
  As someone who coded in C a long, long time ago ,
  I find I am much more productive in various HLLs, such as Python.
  This, of course, excepts kernel code.
  I have half a mind to make a Python, Perl, or Lisp-based filter.
)

mickg

Mime
View raw message