summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-07-13 11:59:43 +0000
committerJonathan Kolb <jon@b0g.us>2010-07-13 11:59:43 +0000
commit5bb3d73305ddc4b7adb5b791c13f66d071c5af2a (patch)
tree83aa47f5f73cb57a543110d78e1c0b126e554dcb
parenteca0feeb4654215e90ddc20151ff0f8157be89b5 (diff)
downloadnginx-5bb3d73305ddc4b7adb5b791c13f66d071c5af2a.tar.gz
Changes with nginx 0.8.45 13 Jul 2010v0.8.45
*) Feature: ngx_http_xslt_filter improvements. Thanks to Laurence Rowe. *) Bugfix: SSI response might be truncated after include with wait="yes"; the bug had appeared in 0.7.25. Thanks to Maxim Dounin. *) Bugfix: the "listen" directive did not support the "setfib=0" parameter.
-rw-r--r--CHANGES17
-rw-r--r--CHANGES.ru12
-rw-r--r--auto/lib/md5/conf8
-rw-r--r--auto/lib/openssl/conf52
-rw-r--r--auto/lib/pcre/conf10
-rw-r--r--auto/lib/zlib/conf7
-rw-r--r--auto/summary4
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/http/modules/ngx_http_access_module.c2
-rw-r--r--src/http/modules/ngx_http_ssi_filter_module.c14
-rw-r--r--src/http/modules/ngx_http_xslt_filter_module.c322
-rw-r--r--src/http/modules/perl/nginx.pm2
-rw-r--r--src/http/ngx_http_core_module.c2
-rw-r--r--src/os/unix/ngx_channel.c2
-rw-r--r--src/os/unix/ngx_process.c8
15 files changed, 100 insertions, 366 deletions
diff --git a/CHANGES b/CHANGES
index 746eacdb6..c07989efa 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,10 +1,23 @@
+Changes with nginx 0.8.45 13 Jul 2010
+
+ *) Feature: ngx_http_xslt_filter improvements.
+ Thanks to Laurence Rowe.
+
+ *) Bugfix: SSI response might be truncated after include with
+ wait="yes"; the bug had appeared in 0.7.25.
+ Thanks to Maxim Dounin.
+
+ *) Bugfix: the "listen" directive did not support the "setfib=0"
+ parameter.
+
+
Changes with nginx 0.8.44 05 Jul 2010
*) Change: now nginx does not cache by default backend responses, if
they have a "Set-Cookie" header line.
- *) Feature: the "listen" directive supports the "setfib" parameter.
+ *) Feature: the "listen" directive supports the "setfib" parameter.
Thanks to Andrew Filonov.
*) Bugfix: the "sub_filter" directive might change character case on
@@ -14,7 +27,7 @@ Changes with nginx 0.8.44 05 Jul 2010
*) Bugfix: compatibility with AIX xcl_r compiler.
- *) Bugfix: nginx treated a large SSLv2 packets as plain requests.
+ *) Bugfix: nginx treated large SSLv2 packets as plain requests.
Thanks to Miroslaw Jaworski.
diff --git a/CHANGES.ru b/CHANGES.ru
index ba23dadef..22c9efad9 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,16 @@
+Изменения в nginx 0.8.45 13.07.2010
+
+ *) Добавление: улучшения в модуле ngx_http_xslt_filter.
+ Спасибо Laurence Rowe.
+
+ *) Исправление: ответ SSI модуля мог передаваться не полностью после
+ команды include с параметром wait="yes"; ошибка появилась в 0.7.25.
+ Спасибо Максиму Дунину.
+
+ *) Исправление: директива listen не поддерживала параметр setfib=0.
+
+
Изменения в nginx 0.8.44 05.07.2010
*) Изменение: теперь nginx по умолчанию не кэширует ответы бэкендов, в
diff --git a/auto/lib/md5/conf b/auto/lib/md5/conf
index 246ee02f7..da1bf1b2c 100644
--- a/auto/lib/md5/conf
+++ b/auto/lib/md5/conf
@@ -94,8 +94,10 @@ else
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
MD5=YES
MD5_LIB=$ngx_md5_lib
- else
+ fi
+ fi
+ if [ $MD5 != YES ]; then
cat << END
$0: error: the HTTP cache module requires md5 functions
@@ -105,9 +107,7 @@ or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl=<path> options.
END
- exit 1
- fi
-
+ exit 1
fi
fi
diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf
index c57a7c830..8218a5b97 100644
--- a/auto/lib/openssl/conf
+++ b/auto/lib/openssl/conf
@@ -37,38 +37,27 @@ if [ $OPENSSL != NONE ]; then
else
- case "$NGX_PLATFORM" in
+ if [ "$NGX_PLATFORM" != win32 ]; then
- win32)
- have=NGX_OPENSSL . auto/have
- have=NGX_SSL . auto/have
- OPENSSL=YES
+ OPENSSL=NO
- CORE_INCS="$CORE_INCS c:/openssl/include"
- CORE_LIBS="$CORE_LIBS c:/openssl/ssleay32.lib"
- CORE_LIBS="$CORE_LIBS c:/openssl/libeay32.lib"
+ ngx_feature="OpenSSL library"
+ ngx_feature_name="NGX_OPENSSL"
+ ngx_feature_run=no
+ ngx_feature_incs="#include <openssl/ssl.h>"
+ ngx_feature_path=
+ ngx_feature_libs="-lssl -lcrypto"
+ ngx_feature_test="SSL_library_init()"
+ . auto/feature
- # libeay32.lib requires gdi32.lib
- CORE_LIBS="$CORE_LIBS gdi32.lib"
- ;;
+ if [ $ngx_found = yes ]; then
+ have=NGX_SSL . auto/have
+ CORE_LIBS="$CORE_LIBS $ngx_feature_libs $NGX_LIBDL"
+ OPENSSL=YES
+ fi
+ fi
- *)
- OPENSSL=NO
-
- ngx_feature="OpenSSL library"
- ngx_feature_name="NGX_OPENSSL"
- ngx_feature_run=no
- ngx_feature_incs="#include <openssl/ssl.h>"
- ngx_feature_path=
- ngx_feature_libs="-lssl -lcrypto"
- ngx_feature_test="SSL_library_init()"
- . auto/feature
-
- if [ $ngx_found = yes ]; then
- have=NGX_SSL . auto/have
- CORE_LIBS="$CORE_LIBS $ngx_feature_libs $NGX_LIBDL"
- OPENSSL=YES
- else
+ if [ $OPENSSL != YES ]; then
cat << END
@@ -78,10 +67,7 @@ into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.
END
- exit 1
- fi
- ;;
-
- esac
+ exit 1
+ fi
fi
diff --git a/auto/lib/pcre/conf b/auto/lib/pcre/conf
index 71c6fc5f7..3008f5892 100644
--- a/auto/lib/pcre/conf
+++ b/auto/lib/pcre/conf
@@ -161,8 +161,10 @@ else
CORE_INCS="$CORE_INCS $ngx_feature_path"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
PCRE=YES
- else
+ fi
+ fi
+ if [ $PCRE != YES ]; then
cat << END
$0: error: the HTTP rewrite module requires the PCRE library.
@@ -171,9 +173,7 @@ option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
END
- exit 1
-
- fi
-
+ exit 1
fi
+
fi
diff --git a/auto/lib/zlib/conf b/auto/lib/zlib/conf
index e44aa3424..843dd5a55 100644
--- a/auto/lib/zlib/conf
+++ b/auto/lib/zlib/conf
@@ -57,8 +57,10 @@ else
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
ZLIB=YES
ngx_found=no
- else
+ fi
+ fi
+ if [ $ZLIB != YES ]; then
cat << END
$0: error: the HTTP gzip module requires the zlib library.
@@ -67,8 +69,7 @@ option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
END
- exit 1
- fi
+ exit 1
fi
fi
diff --git a/auto/summary b/auto/summary
index a7244a183..8a71cbeff 100644
--- a/auto/summary
+++ b/auto/summary
@@ -38,7 +38,6 @@ else
case $PCRE in
YES) echo " + using system PCRE library" ;;
NONE) echo " + PCRE library is not used" ;;
- NO) echo " + PCRE library is not found" ;;
*) echo " + using PCRE library: $PCRE" ;;
esac
fi
@@ -46,14 +45,12 @@ fi
case $OPENSSL in
YES) echo " + using system OpenSSL library" ;;
NONE) echo " + OpenSSL library is not used" ;;
- NO) echo " + OpenSSL library is not found" ;;
*) echo " + using OpenSSL library: $OPENSSL" ;;
esac
case $MD5 in
YES) echo " + md5: using $MD5_LIB library" ;;
NONE) echo " + md5 library is not used" ;;
- NO) echo " + md5 library is not found" ;;
*) echo " + using md5 library: $MD5" ;;
esac
@@ -67,7 +64,6 @@ esac
case $ZLIB in
YES) echo " + using system zlib library" ;;
NONE) echo " + zlib library is not used" ;;
- NO) echo " + zlib library is not found" ;;
*) echo " + using zlib library: $ZLIB" ;;
esac
diff --git a/src/core/nginx.h b/src/core/nginx.h
index ffe2f34b5..e9247e94b 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,8 +8,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 8044
-#define NGINX_VERSION "0.8.44"
+#define nginx_version 8045
+#define NGINX_VERSION "0.8.45"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/http/modules/ngx_http_access_module.c b/src/http/modules/ngx_http_access_module.c
index c1e7718c0..bfc36e9bf 100644
--- a/src/http/modules/ngx_http_access_module.c
+++ b/src/http/modules/ngx_http_access_module.c
@@ -190,7 +190,7 @@ ngx_http_access_inet6(ngx_http_request_t *r, ngx_http_access_loc_conf_t *alcf,
ml = ngx_inet6_ntop(rule6[i].mask.s6_addr, mt, NGX_INET6_ADDRSTRLEN);
al = ngx_inet6_ntop(rule6[i].addr.s6_addr, at, NGX_INET6_ADDRSTRLEN);
- ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ ngx_log_debug6(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"access: %*s %*s %*s", cl, ct, ml, mt, al, at);
}
#endif
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c
index 45626c6b0..994efc40c 100644
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -70,6 +70,8 @@ typedef enum {
static ngx_int_t ngx_http_ssi_output(ngx_http_request_t *r,
ngx_http_ssi_ctx_t *ctx);
+static void ngx_http_ssi_buffered(ngx_http_request_t *r,
+ ngx_http_ssi_ctx_t *ctx);
static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
ngx_http_ssi_ctx_t *ctx);
static ngx_str_t *ngx_http_ssi_get_variable(ngx_http_request_t *r,
@@ -793,6 +795,7 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
}
if (rc == NGX_DONE || rc == NGX_AGAIN || rc == NGX_ERROR) {
+ ngx_http_ssi_buffered(r, ctx);
return rc;
}
}
@@ -945,14 +948,21 @@ ngx_http_ssi_output(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx)
}
}
+ ngx_http_ssi_buffered(r, ctx);
+
+ return rc;
+}
+
+
+static void
+ngx_http_ssi_buffered(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx)
+{
if (ctx->in || ctx->buf) {
r->buffered |= NGX_HTTP_SSI_BUFFERED;
} else {
r->buffered &= ~NGX_HTTP_SSI_BUFFERED;
}
-
- return rc;
}
diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c
index a5c3da4c7..d67ec8047 100644
--- a/src/http/modules/ngx_http_xslt_filter_module.c
+++ b/src/http/modules/ngx_http_xslt_filter_module.c
@@ -54,7 +54,6 @@ typedef struct {
typedef struct {
xmlDocPtr doc;
xmlParserCtxtPtr ctxt;
- xmlSAXHandler *sax;
ngx_http_request_t *request;
ngx_array_t params;
@@ -68,49 +67,8 @@ static ngx_int_t ngx_http_xslt_add_chunk(ngx_http_request_t *r,
ngx_http_xslt_filter_ctx_t *ctx, ngx_buf_t *b);
-static void ngx_http_xslt_sax_start_document(void *data);
-static void ngx_http_xslt_sax_end_document(void *data);
-static void ngx_http_xslt_sax_internal_subset(void *data, const xmlChar *name,
- const xmlChar *externalId, const xmlChar *systemId);
static void ngx_http_xslt_sax_external_subset(void *data, const xmlChar *name,
const xmlChar *externalId, const xmlChar *systemId);
-static void ngx_http_xslt_sax_entity_decl(void *data, const xmlChar *name,
- int type, const xmlChar *publicId, const xmlChar *systemId,
- xmlChar *content);
-static void ngx_http_xslt_sax_attribute_decl(void *data, const xmlChar *elem,
- const xmlChar *fullname, int type, int def, const xmlChar *defaultValue,
- xmlEnumerationPtr tree);
-static void ngx_http_xslt_sax_element_decl(void *data, const xmlChar * name,
- int type, xmlElementContentPtr content);
-static void ngx_http_xslt_sax_notation_decl(void *data, const xmlChar *name,
- const xmlChar *publicId, const xmlChar *systemId);
-static void ngx_http_xslt_sax_unparsed_entity_decl(void *data,
- const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId,
- const xmlChar *notationName);
-static void ngx_http_xslt_sax_start_element(void *data,
- const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI,
- int nb_namespaces, const xmlChar **namespaces, int nb_attributes,
- int nb_defaulted, const xmlChar **attributes);
-static void ngx_http_xslt_sax_end_element(void *data,
- const xmlChar * localname ATTRIBUTE_UNUSED,
- const xmlChar * prefix ATTRIBUTE_UNUSED,
- const xmlChar * URI ATTRIBUTE_UNUSED);
-static void ngx_http_xslt_sax_characters(void *data, const xmlChar *p, int len);
-static void ngx_http_xslt_sax_cdata_block(void *data, const xmlChar *p,
- int len);
-static xmlEntityPtr ngx_http_xslt_sax_get_entity(void *data,
- const xmlChar *name);
-static xmlEntityPtr ngx_http_xslt_sax_get_parameter_entity(void *data,
- const xmlChar *name);
-static xmlParserInputPtr ngx_http_xslt_sax_resolve_entity(void *data,
- const xmlChar *publicId, const xmlChar *systemId);
-static void ngx_http_xslt_sax_reference(void *data, const xmlChar *name);
-static void ngx_http_xslt_sax_comment(void *data, const xmlChar *value);
-static void ngx_http_xslt_sax_processing_instruction(void *data,
- const xmlChar *target, const xmlChar *pidata);
-static int ngx_http_xslt_sax_is_standalone(void *data);
-static int ngx_http_xslt_sax_has_internal_subset(void *data);
-static int ngx_http_xslt_sax_has_external_subset(void *data);
static void ngx_cdecl ngx_http_xslt_sax_error(void *data, const char *msg, ...);
@@ -366,9 +324,8 @@ static ngx_int_t
ngx_http_xslt_add_chunk(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx,
ngx_buf_t *b)
{
- int err;
- xmlSAXHandler *sax;
- xmlParserCtxtPtr ctxt;
+ int err;
+ xmlParserCtxtPtr ctxt;
if (ctx->ctxt == NULL) {
@@ -379,50 +336,12 @@ ngx_http_xslt_add_chunk(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx,
return NGX_ERROR;
}
- ctx->sax = ngx_palloc(r->pool, sizeof(xmlSAXHandler));
- if (ctx->sax == NULL) {
- return NGX_ERROR;
- }
-
- sax = ctxt->sax;
-
- ngx_memcpy(ctx->sax, sax, sizeof(xmlSAXHandler));
-
- sax->startDocument = ngx_http_xslt_sax_start_document;
- sax->endDocument = ngx_http_xslt_sax_end_document;
-
- sax->internalSubset = ngx_http_xslt_sax_internal_subset;
- sax->externalSubset = ngx_http_xslt_sax_external_subset;
- sax->entityDecl = ngx_http_xslt_sax_entity_decl;
- sax->attributeDecl = ngx_http_xslt_sax_attribute_decl;
- sax->elementDecl = ngx_http_xslt_sax_element_decl;
- sax->notationDecl = ngx_http_xslt_sax_notation_decl;
- sax->unparsedEntityDecl = ngx_http_xslt_sax_unparsed_entity_decl;
- sax->setDocumentLocator = NULL;
-
- sax->startElementNs = ngx_http_xslt_sax_start_element;
- sax->endElementNs = ngx_http_xslt_sax_end_element;
-
- sax->characters = ngx_http_xslt_sax_characters;
- sax->ignorableWhitespace = ngx_http_xslt_sax_characters;
- sax->cdataBlock = ngx_http_xslt_sax_cdata_block;
- sax->getEntity = ngx_http_xslt_sax_get_entity;
- sax->resolveEntity = ngx_http_xslt_sax_resolve_entity;
- sax->getParameterEntity = ngx_http_xslt_sax_get_parameter_entity;
- sax->reference = ngx_http_xslt_sax_reference;
- sax->comment = ngx_http_xslt_sax_comment;
- sax->processingInstruction = ngx_http_xslt_sax_processing_instruction;
-
- sax->isStandalone = ngx_http_xslt_sax_is_standalone;
- sax->hasInternalSubset = ngx_http_xslt_sax_has_internal_subset;
- sax->hasExternalSubset = ngx_http_xslt_sax_has_external_subset;
-
- sax->warning = NULL;
- sax->error = ngx_http_xslt_sax_error;
- sax->fatalError = ngx_http_xslt_sax_error;
-
- ctxt->userData = ctx;
-
+ 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;
@@ -446,44 +365,18 @@ ngx_http_xslt_add_chunk(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx,
static void
-ngx_http_xslt_sax_start_document(void *data)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->startDocument(ctx->ctxt);
-}
-
-
-static void
-ngx_http_xslt_sax_end_document(void *data)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->endDocument(ctx->ctxt);
-}
-
-
-static void
-ngx_http_xslt_sax_internal_subset(void *data, const xmlChar *name,
- const xmlChar *externalId, const xmlChar *systemId)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->internalSubset(ctx->ctxt, name, externalId, systemId);
-}
-
-
-static void
ngx_http_xslt_sax_external_subset(void *data, const xmlChar *name,
const xmlChar *externalId, const xmlChar *systemId)
{
- ngx_http_xslt_filter_ctx_t *ctx = data;
+ xmlParserCtxtPtr ctxt = data;
xmlDocPtr doc;
xmlDtdPtr dtd;
ngx_http_request_t *r;
+ ngx_http_xslt_filter_ctx_t *ctx;
ngx_http_xslt_filter_loc_conf_t *conf;
+ ctx = ctxt->sax->_private;
r = ctx->request;
conf = ngx_http_get_module_loc_conf(r, ngx_http_xslt_filter_module);
@@ -494,7 +387,7 @@ ngx_http_xslt_sax_external_subset(void *data, const xmlChar *name,
externalId ? externalId : (xmlChar *) "",
systemId ? systemId : (xmlChar *) "");
- doc = ctx->ctxt->myDoc;
+ doc = ctxt->myDoc;
#if (NGX_HTTP_XSLT_REUSE_DTD)
@@ -522,194 +415,17 @@ ngx_http_xslt_sax_external_subset(void *data, const xmlChar *name,
}
-static void
-ngx_http_xslt_sax_entity_decl(void *data, const xmlChar *name, int type,
- const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->entityDecl(ctx->ctxt, name, type, publicId, systemId, content);
-}
-
-
-static void
-ngx_http_xslt_sax_attribute_decl(void *data, const xmlChar *elem,
- const xmlChar *fullname, int type, int def, const xmlChar *defaultValue,
- xmlEnumerationPtr tree)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->attributeDecl(ctx->ctxt, elem, fullname, type, def, defaultValue,
- tree);
-}
-
-
-static void
-ngx_http_xslt_sax_element_decl(void *data, const xmlChar * name, int type,
- xmlElementContentPtr content)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->elementDecl(ctx->ctxt, name, type, content);
-}
-
-
-static void
-ngx_http_xslt_sax_notation_decl(void *data, const xmlChar *name,
- const xmlChar *publicId, const xmlChar *systemId)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->notationDecl(ctx->ctxt, name, publicId, systemId);
-}
-
-
-static void
-ngx_http_xslt_sax_unparsed_entity_decl(void *data, const xmlChar *name,
- const xmlChar *publicId, const xmlChar *systemId,
- const xmlChar *notationName)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->unparsedEntityDecl(ctx->ctxt, name, publicId, systemId,
- notationName);
-}
-
-
-static void
-ngx_http_xslt_sax_start_element(void *data, const xmlChar *localname,
- const xmlChar *prefix, const xmlChar *URI, int nb_namespaces,
- const xmlChar **namespaces, int nb_attributes, int nb_defaulted,
- const xmlChar **attributes)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->startElementNs(ctx->ctxt, localname, prefix, URI, nb_namespaces,
- namespaces, nb_attributes, nb_defaulted, attributes);
-}
-
-
-static void
-ngx_http_xslt_sax_end_element(void *data,
- const xmlChar * localname ATTRIBUTE_UNUSED,
- const xmlChar * prefix ATTRIBUTE_UNUSED,
- const xmlChar * URI ATTRIBUTE_UNUSED)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->endElementNs(ctx->ctxt, localname, prefix, URI);
-}
-
-
-static void
-ngx_http_xslt_sax_characters(void *data, const xmlChar *p, int len)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->characters(ctx->ctxt, p, len);
-}
-
-
-static void
-ngx_http_xslt_sax_cdata_block(void *data, const xmlChar *p, int len)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->cdataBlock(ctx->ctxt, p, len);
-}
-
-
-static xmlEntityPtr
-ngx_http_xslt_sax_get_entity(void *data, const xmlChar *name)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- return ctx->sax->getEntity(ctx->ctxt, name);
-}
-
-
-static xmlEntityPtr
-ngx_http_xslt_sax_get_parameter_entity(void *data, const xmlChar *name)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- return ctx->sax->getParameterEntity(ctx->ctxt, name);
-}
-
-
-static xmlParserInputPtr
-ngx_http_xslt_sax_resolve_entity(void *data, const xmlChar *publicId,
- const xmlChar *systemId)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- return ctx->sax->resolveEntity(ctx->ctxt, publicId, systemId);
-}
-
-
-static void
-ngx_http_xslt_sax_reference(void *data, const xmlChar *name)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->reference(ctx->ctxt, name);
-}
-
-
-static void
-ngx_http_xslt_sax_comment(void *data, const xmlChar *value)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->comment(ctx->ctxt, value);
-}
-
-
-static void
-ngx_http_xslt_sax_processing_instruction(void *data, const xmlChar *target,
- const xmlChar *pidata)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- ctx->sax->processingInstruction(ctx->ctxt, target, pidata);
-}
-
-
-static int
-ngx_http_xslt_sax_is_standalone(void *data)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- return ctx->sax->isStandalone(ctx->ctxt);
-}
-
-
-static int
-ngx_http_xslt_sax_has_internal_subset(void *data)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- return ctx->sax->hasInternalSubset(ctx->ctxt);
-}
-
-
-static int
-ngx_http_xslt_sax_has_external_subset(void *data)
-{
- ngx_http_xslt_filter_ctx_t *ctx = data;
-
- return ctx->sax->hasExternalSubset(ctx->ctxt);
-}
-
-
static void ngx_cdecl
ngx_http_xslt_sax_error(void *data, const char *msg, ...)
{
- ngx_http_xslt_filter_ctx_t *ctx = data;
+ xmlParserCtxtPtr ctxt = data;
+
+ size_t n;
+ va_list args;
+ ngx_http_xslt_filter_ctx_t *ctx;
+ u_char buf[NGX_MAX_ERROR_STR];
- size_t n;
- va_list args;
- u_char buf[NGX_MAX_ERROR_STR];
+ ctx = ctxt->sax->_private;
buf[0] = '\0';
diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm
index c3f4c2e76..f8527658f 100644
--- a/src/http/modules/perl/nginx.pm
+++ b/src/http/modules/perl/nginx.pm
@@ -48,7 +48,7 @@ our @EXPORT = qw(
HTTP_INSUFFICIENT_STORAGE
);
-our $VERSION = '0.8.44';
+our $VERSION = '0.8.45';
require XSLoader;
XSLoader::load('nginx', $VERSION);
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 0296d00bf..b4b86a755 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -3440,7 +3440,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
if (ngx_strncmp(value[n].data, "setfib=", 7) == 0) {
lsopt.setfib = ngx_atoi(value[n].data + 7, value[n].len - 7);
- if (lsopt.setfib == NGX_ERROR || lsopt.setfib == 0) {
+ if (lsopt.setfib == NGX_ERROR) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"invalid setfib \"%V\"", &value[n]);
return NGX_CONF_ERROR;
diff --git a/src/os/unix/ngx_channel.c b/src/os/unix/ngx_channel.c
index a9ac45c9c..a0bdc2b8e 100644
--- a/src/os/unix/ngx_channel.c
+++ b/src/os/unix/ngx_channel.c
@@ -44,7 +44,7 @@ ngx_write_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size,
* dereferencing type-punned pointer will break strict-aliasing rules
*
* Fortunately, gcc with -O1 compiles this ngx_memcpy()
- * in the same simple assigment as in the code above
+ * in the same simple assignment as in the code above
*/
ngx_memcpy(CMSG_DATA(&cmsg.cm), &ch->fd, sizeof(int));
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
index 224101d2e..4574dfaf3 100644
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -11,10 +11,10 @@
typedef struct {
- int signo;
- char *signame;
- char *name;
- void (*handler)(int signo);
+ int signo;
+ char *signame;
+ char *name;
+ void (*handler)(int signo);
} ngx_signal_t;