I am working on a new load-balancing module, similar to upstream-fair, but
with different requirements (and hence different features). One of my
planned features is that the module will send an alert when it detects an
Within my load balancing function (my implementation of
r->upstream->peer.get) I would like to send an alert to an external
process. I am considering sending it over either a socket connection or
perhaps a named pipe.
Does anyone have any tips on how I could accomplish this? Any pointers to
nginx code or 3rd party module code that performs similar communication?
These patches add HTML parsing support to the XSLT filter module. They have
been updated to incorporate earlier feedback from the list and irc and
correspond with the current head of:
They apply on top of the xslt_param changes from:
Note that the current ordering of filter modules means that the charset is not
normally set on headers_out before the XSLT filter runs. As you can control
the output charset encoding from XSL with "<xsl:output encoding=.../>" it
probably makes sense to move the xslt filter to execute after the charset
filter. However, this is left outside the scope of this patch set.
Date: 2012-03-28 01:56:49 +0000 (Wed, 28 Mar 2012)
New Revision: 4561
Xslt: parser options now set with xmlCtxtUseOptions().
Note that "ctxt->loadsubset = 1" previously used isn't really correct as
ctxt->loadsubset is a bitfield now. The use of xmlCtxtUseOptions() with
XML_PARSE_DTDLOAD is believed to be a better way to do the same thing.
Patch by Laurence Rowe.
--- trunk/src/http/modules/ngx_http_xslt_filter_module.c 2012-03-27 16:44:52 UTC (rev 4560)
+++ trunk/src/http/modules/ngx_http_xslt_filter_module.c 2012-03-28 01:56:49 UTC (rev 4561)
@@ -362,15 +362,14 @@
+ xmlCtxtUseOptions(ctxt, XML_PARSE_NOENT|XML_PARSE_DTDLOAD
ctxt->sax->externalSubset = ngx_http_xslt_sax_external_subset;
ctxt->sax->setDocumentLocator = NULL;
- ctxt->sax->warning = NULL;
ctxt->sax->error = ngx_http_xslt_sax_error;
ctxt->sax->fatalError = ngx_http_xslt_sax_error;
ctxt->sax->_private = ctx;
- ctxt->replaceEntities = 1;
- ctxt->loadsubset = 1;
ctx->ctxt = ctxt;
ctx->request = r;