mirror of
https://github.com/nginx/nginx.git
synced 2025-06-27 17:22:48 +08:00
nginx-0.1.19-RELEASE import
*) Bugfix: now, if request contains the zero, then the 404 error is returned for the local requests. *) Bugfix: nginx could not be built on NetBSD 2.0. *) Bugfix: the timeout may occur while reading of the the client request body via SSL connections.
This commit is contained in:
parent
675cc5a855
commit
1ebfead9da
63
auto/make
63
auto/make
@ -32,7 +32,7 @@ if [ "$CC" = wcl386 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# ALL_INCS, required by OpenWatcom C precompiled headers
|
# ALL_INCS, required by the addons and by OpenWatcom C precompiled headers
|
||||||
|
|
||||||
ngx_incs=`echo $CORE_INCS $NGX_OBJS $HTTP_INCS $IMAP_INCS\
|
ngx_incs=`echo $CORE_INCS $NGX_OBJS $HTTP_INCS $IMAP_INCS\
|
||||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
||||||
@ -120,10 +120,32 @@ END
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test -n "$NGX_ADDON_SRCS"; then
|
||||||
|
|
||||||
|
cat << END >> $NGX_MAKEFILE
|
||||||
|
|
||||||
|
ADDON_DEPS = \$(CORE_DPES) $NGX_ADDON_DEPS
|
||||||
|
|
||||||
|
END
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# nginx
|
# nginx
|
||||||
|
|
||||||
ngx_all_srcs=`echo $ngx_all_srcs | sed -e "s/\//$ngx_regex_dirsep/g"`
|
ngx_all_srcs=`echo $ngx_all_srcs | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||||
ngx_modules_c=`echo $NGX_MODULES_C | sed -e "s/\//$ngx_regex_dirsep/g"`
|
|
||||||
|
for ngx_src in $NGX_ADDON_SRCS
|
||||||
|
do
|
||||||
|
ngx_obj="addon/`basename \`dirname $ngx_src\``"
|
||||||
|
|
||||||
|
test -d $NGX_OBJS/$ngx_obj || mkdir -p $NGX_OBJS/$ngx_obj
|
||||||
|
|
||||||
|
ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \
|
||||||
|
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||||
|
|
||||||
|
ngx_all_srcs="$ngx_all_srcs $ngx_obj"
|
||||||
|
done
|
||||||
|
|
||||||
ngx_all_objs=`echo $ngx_all_srcs \
|
ngx_all_objs=`echo $ngx_all_srcs \
|
||||||
| sed -e "s/\([^ ]*\.\)cpp/$NGX_OBJS\/\1$ngx_objext/g" \
|
| sed -e "s/\([^ ]*\.\)cpp/$NGX_OBJS\/\1$ngx_objext/g" \
|
||||||
@ -131,6 +153,8 @@ ngx_all_objs=`echo $ngx_all_srcs \
|
|||||||
-e "s/\([^ ]*\.\)c/$NGX_OBJS\/\1$ngx_objext/g" \
|
-e "s/\([^ ]*\.\)c/$NGX_OBJS\/\1$ngx_objext/g" \
|
||||||
-e "s/\([^ ]*\.\)S/$NGX_OBJS\/\1$ngx_objext/g"`
|
-e "s/\([^ ]*\.\)S/$NGX_OBJS\/\1$ngx_objext/g"`
|
||||||
|
|
||||||
|
ngx_modules_c=`echo $NGX_MODULES_C | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||||
|
|
||||||
ngx_modules_obj=`echo $ngx_modules_c | sed -e "s/\(.*\.\)c/\1$ngx_objext/"`
|
ngx_modules_obj=`echo $ngx_modules_c | sed -e "s/\(.*\.\)c/\1$ngx_objext/"`
|
||||||
|
|
||||||
|
|
||||||
@ -185,7 +209,6 @@ END
|
|||||||
|
|
||||||
for ngx_src in $CORE_SRCS
|
for ngx_src in $CORE_SRCS
|
||||||
do
|
do
|
||||||
|
|
||||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||||
ngx_obj=`echo $ngx_src \
|
ngx_obj=`echo $ngx_src \
|
||||||
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||||
@ -215,7 +238,6 @@ if [ $HTTP = YES ]; then
|
|||||||
|
|
||||||
for ngx_src in $HTTP_SRCS
|
for ngx_src in $HTTP_SRCS
|
||||||
do
|
do
|
||||||
|
|
||||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||||
ngx_obj=`echo $ngx_src \
|
ngx_obj=`echo $ngx_src \
|
||||||
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||||
@ -229,7 +251,6 @@ $ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src
|
|||||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
|
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -247,7 +268,6 @@ if [ $IMAP = YES ]; then
|
|||||||
|
|
||||||
for ngx_src in $IMAP_SRCS
|
for ngx_src in $IMAP_SRCS
|
||||||
do
|
do
|
||||||
|
|
||||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||||
ngx_obj=`echo $ngx_src \
|
ngx_obj=`echo $ngx_src \
|
||||||
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||||
@ -261,7 +281,38 @@ $ngx_obj: \$(CORE_DEPS) \$(IMAP_DEPS)$ngx_cont$ngx_src
|
|||||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
|
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
|
||||||
|
|
||||||
END
|
END
|
||||||
|
done
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# the addons sources
|
||||||
|
|
||||||
|
if test -n "$NGX_ADDON_SRCS"; then
|
||||||
|
|
||||||
|
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||||
|
|
||||||
|
for ngx_src in $NGX_ADDON_SRCS
|
||||||
|
do
|
||||||
|
ngx_obj="addon/`basename \`dirname $ngx_src\``"
|
||||||
|
|
||||||
|
ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \
|
||||||
|
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||||
|
|
||||||
|
ngx_obj=`echo $ngx_obj \
|
||||||
|
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||||
|
-e "s/^\(.*\.\)cc$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||||
|
-e "s/^\(.*\.\)c$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||||
|
-e "s/^\(.*\.\)S$/$ngx_objs_dir\1$ngx_objext/g"`
|
||||||
|
|
||||||
|
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||||
|
|
||||||
|
cat << END >> $NGX_MAKEFILE
|
||||||
|
|
||||||
|
$ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src
|
||||||
|
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
|
||||||
|
|
||||||
|
END
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
29
auto/modules
29
auto/modules
@ -162,9 +162,31 @@ if [ $HTTP_STUB_STATUS = YES ]; then
|
|||||||
HTTP_SRCS="$HTTP_SRCS src/http/modules/ngx_http_stub_status_module.c"
|
HTTP_SRCS="$HTTP_SRCS src/http/modules/ngx_http_stub_status_module.c"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -r $NGX_OBJS/auto ]; then
|
#if [ -r $NGX_OBJS/auto ]; then
|
||||||
. $NGX_OBJS/auto
|
# . $NGX_OBJS/auto
|
||||||
|
#fi
|
||||||
|
|
||||||
|
|
||||||
|
if test -n "$NGX_ADDONS"; then
|
||||||
|
|
||||||
|
echo configuring additional modules
|
||||||
|
|
||||||
|
for ngx_addon_dir in $NGX_ADDONS
|
||||||
|
do
|
||||||
|
echo "adding module in $ngx_addon_dir"
|
||||||
|
|
||||||
|
if test -f $ngx_addon_dir/config; then
|
||||||
|
. $ngx_addon_dir/config
|
||||||
|
|
||||||
|
echo " + $ngx_addon_name was configured"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "$0: error: no $ngx_addon_dir/config was found"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
modules="$CORE_MODULES $EVENT_MODULES"
|
modules="$CORE_MODULES $EVENT_MODULES"
|
||||||
|
|
||||||
@ -174,8 +196,11 @@ if [ $HTTP = YES ]; then
|
|||||||
$HTTP_COPY_FILTER_MODULE \
|
$HTTP_COPY_FILTER_MODULE \
|
||||||
$HTTP_RANGE_BODY_FILTER_MODULE \
|
$HTTP_RANGE_BODY_FILTER_MODULE \
|
||||||
$HTTP_NOT_MODIFIED_FILTER_MODULE"
|
$HTTP_NOT_MODIFIED_FILTER_MODULE"
|
||||||
|
|
||||||
|
NGX_ADDON_DEPS="$NGX_ADDON_DEPS \$(HTTP_DEPS)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
IMAP_MODULES=$IMAP_MODULE
|
IMAP_MODULES=$IMAP_MODULE
|
||||||
|
|
||||||
if [ $IMAP = YES ]; then
|
if [ $IMAP = YES ]; then
|
||||||
|
@ -63,7 +63,7 @@ HTTP_STUB_STATUS=NO
|
|||||||
|
|
||||||
IMAP=NO
|
IMAP=NO
|
||||||
|
|
||||||
NGX_MODULES=
|
NGX_ADDONS=
|
||||||
|
|
||||||
USE_PCRE=NO
|
USE_PCRE=NO
|
||||||
PCRE=NONE
|
PCRE=NONE
|
||||||
@ -139,7 +139,7 @@ do
|
|||||||
|
|
||||||
--with-imap) IMAP=YES ;;
|
--with-imap) IMAP=YES ;;
|
||||||
|
|
||||||
--with-module=*) NGX_MODULES="$NGX_MODULES $values" ;;
|
--add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
|
||||||
|
|
||||||
--with-cc=*) CC="$value" ;;
|
--with-cc=*) CC="$value" ;;
|
||||||
--with-cpp=*) CPP="$value" ;;
|
--with-cpp=*) CPP="$value" ;;
|
||||||
|
11
auto/os/conf
11
auto/os/conf
@ -123,4 +123,15 @@ if [ $NGX_PLATFORM != win32 ]; then
|
|||||||
. auto/feature
|
. auto/feature
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ NGX_SYSTEM != "NetBSD" ]; then
|
||||||
|
|
||||||
|
# NetBSD 2.0 incompatibly defines kevent.udata as "intptr_t"
|
||||||
|
cat << END >> $NGX_AUTO_CONFIG_H
|
||||||
|
|
||||||
|
#define NGX_KQUEUE_UDATA_T (void *)
|
||||||
|
|
||||||
|
END
|
||||||
|
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -64,6 +64,7 @@ then
|
|||||||
EVENT_FOUND=YES
|
EVENT_FOUND=YES
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
NGX_KQUEUE_CHECKED=YES
|
NGX_KQUEUE_CHECKED=YES
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,6 +9,41 @@
|
|||||||
<title lang="en">nginx changelog</title>
|
<title lang="en">nginx changelog</title>
|
||||||
|
|
||||||
|
|
||||||
|
<changes ver="0.1.19" date="16.02.2005">
|
||||||
|
|
||||||
|
<change type="bugfix">
|
||||||
|
<para lang="ru">
|
||||||
|
ÅÓÌÉ × ÚÁÐÒÏÓÅ ÅÓÔØ ÎÕÌØ, ÔÏ ÄÌÑ ÌÏËÁÌØÎÙÈ ÚÁÐÒÏÓÏ× ÔÅÐÅÒØ ×ÏÚ×ÒÁÝÁÅÔÓÑ
|
||||||
|
ÏÛÉÂËÁ 404.
|
||||||
|
</para>
|
||||||
|
<para lang="en">
|
||||||
|
now, if request contains the zero, then the 404 error is returned
|
||||||
|
for the local requests.
|
||||||
|
</para>
|
||||||
|
</change>
|
||||||
|
|
||||||
|
<change type="bugfix">
|
||||||
|
<para lang="ru">
|
||||||
|
nginx ÎÅ ÓÏÂÉÒÁÌÓÑ ÐÏÄ NetBSD 2.0.
|
||||||
|
</para>
|
||||||
|
<para lang="en">
|
||||||
|
nginx could not be built on NetBSD 2.0.
|
||||||
|
</para>
|
||||||
|
</change>
|
||||||
|
|
||||||
|
<change type="bugfix">
|
||||||
|
<para lang="ru">
|
||||||
|
×Ï ×ÒÅÍÑ ÞÔÅÎÉÑ ÔÅÌÁ ÚÁÐÒÏÓÁ ËÌÉÅÎÔÁ × SSL ÓÏÅÄÉÎÅÎÉÉ ÍÏÇ ÐÒÏÉÚÏÊÔÉ ÔÁÊÍÁÕÔ.
|
||||||
|
</para>
|
||||||
|
<para lang="en">
|
||||||
|
the timeout may occur while reading of the the client request body
|
||||||
|
via SSL connections.
|
||||||
|
</para>
|
||||||
|
</change>
|
||||||
|
|
||||||
|
</changes>
|
||||||
|
|
||||||
|
|
||||||
<changes ver="0.1.18" date="09.02.2005">
|
<changes ver="0.1.18" date="09.02.2005">
|
||||||
|
|
||||||
<change type="workaround">
|
<change type="workaround">
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#define _NGINX_H_INCLUDED_
|
#define _NGINX_H_INCLUDED_
|
||||||
|
|
||||||
|
|
||||||
#define NGINX_VER "nginx/0.1.18"
|
#define NGINX_VER "nginx/0.1.19"
|
||||||
|
|
||||||
#define NGINX_VAR "NGINX"
|
#define NGINX_VAR "NGINX"
|
||||||
#define NGX_NEWPID_EXT ".newbin"
|
#define NGX_NEWPID_EXT ".newbin"
|
||||||
|
@ -12,7 +12,7 @@ static void *ngx_radix_alloc(ngx_radix_tree_t *tree);
|
|||||||
|
|
||||||
|
|
||||||
ngx_radix_tree_t *
|
ngx_radix_tree_t *
|
||||||
ngx_radix_tree_create(ngx_pool_t *pool, ngx_uint_t preallocate)
|
ngx_radix_tree_create(ngx_pool_t *pool, ngx_int_t preallocate)
|
||||||
{
|
{
|
||||||
uint32_t key, mask, inc;
|
uint32_t key, mask, inc;
|
||||||
ngx_radix_tree_t *tree;
|
ngx_radix_tree_t *tree;
|
||||||
@ -35,13 +35,46 @@ ngx_radix_tree_create(ngx_pool_t *pool, ngx_uint_t preallocate)
|
|||||||
tree->root->parent = NULL;
|
tree->root->parent = NULL;
|
||||||
tree->root->value = NGX_RADIX_NO_VALUE;
|
tree->root->value = NGX_RADIX_NO_VALUE;
|
||||||
|
|
||||||
|
if (preallocate == 0) {
|
||||||
|
return tree;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We preallocate the first nodes: 0, 1, 00, 01, 10, 11, 000, 001, etc.,
|
* We preallocate the first nodes: 0, 1, 00, 01, 10, 11, 000, 001, etc.,
|
||||||
* to increase the TLB hits even if for the first lookup iterations.
|
* to increase the TLB hits even if for the first lookup iterations.
|
||||||
* On the 32-bit platforms the 7 preallocated bits takes continuous 4K,
|
* On the 32-bit platforms the 7 preallocated bits takes continuous 4K,
|
||||||
* 8 - 8K, 9 - 16K, etc.
|
* 8 - 8K, 9 - 16K, etc. On the 64-bit platforms the 6 preallocated bits
|
||||||
|
* takes continuous 4K, 7 - 8K, 8 - 16K, etc. There is no sense to
|
||||||
|
* to preallocate more than one page, because further preallocation
|
||||||
|
* distribute the only bit per page. Instead, the random insertion
|
||||||
|
* may distribute several bits per page.
|
||||||
|
*
|
||||||
|
* Thus, by default we preallocate maximum
|
||||||
|
* 6 bits on amd64 (64-bit platform and 4K pages)
|
||||||
|
* 7 bits on i386 (32-bit platform and 4K pages)
|
||||||
|
* 7 bits on sparc64 in 64-bit mode (8K pages)
|
||||||
|
* 8 bits on sparc64 in 32-bit mode (8K pages)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (preallocate == -1) {
|
||||||
|
switch (ngx_pagesize / sizeof(ngx_radix_tree_t)) {
|
||||||
|
|
||||||
|
/* amd64 */
|
||||||
|
case 128:
|
||||||
|
preallocate = 6;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* i386, sparc64 */
|
||||||
|
case 256:
|
||||||
|
preallocate = 7;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* sparc64 in 32-bit mode */
|
||||||
|
default:
|
||||||
|
preallocate = 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mask = 0;
|
mask = 0;
|
||||||
inc = 0x80000000;
|
inc = 0x80000000;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ typedef struct {
|
|||||||
|
|
||||||
|
|
||||||
ngx_radix_tree_t *ngx_radix_tree_create(ngx_pool_t *pool,
|
ngx_radix_tree_t *ngx_radix_tree_create(ngx_pool_t *pool,
|
||||||
ngx_uint_t preallocate);
|
ngx_int_t preallocate);
|
||||||
ngx_int_t ngx_radix32tree_insert(ngx_radix_tree_t *tree,
|
ngx_int_t ngx_radix32tree_insert(ngx_radix_tree_t *tree,
|
||||||
uint32_t key, uint32_t mask, uintptr_t value);
|
uint32_t key, uint32_t mask, uintptr_t value);
|
||||||
ngx_int_t ngx_radix32tree_delete(ngx_radix_tree_t *tree,
|
ngx_int_t ngx_radix32tree_delete(ngx_radix_tree_t *tree,
|
||||||
|
@ -308,7 +308,6 @@ void ngx_gmtime(time_t t, ngx_tm_t *tp)
|
|||||||
mday -= 28;
|
mday -= 28;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* there is no "yday" in Win32 SYSTEMTIME
|
* there is no "yday" in Win32 SYSTEMTIME
|
||||||
*
|
*
|
||||||
|
@ -390,7 +390,7 @@ static ngx_int_t ngx_kqueue_set_event(ngx_event_t *ev, int filter, u_int flags)
|
|||||||
kev->ident = c->fd;
|
kev->ident = c->fd;
|
||||||
kev->filter = filter;
|
kev->filter = filter;
|
||||||
kev->flags = flags;
|
kev->flags = flags;
|
||||||
kev->udata = (void *) ((uintptr_t) ev | ev->instance);
|
kev->udata = NGX_KQUEUE_UDATA_T ((uintptr_t) ev | ev->instance);
|
||||||
|
|
||||||
if (filter == EVFILT_VNODE) {
|
if (filter == EVFILT_VNODE) {
|
||||||
kev->fflags = NOTE_DELETE|NOTE_WRITE|NOTE_EXTEND
|
kev->fflags = NOTE_DELETE|NOTE_WRITE|NOTE_EXTEND
|
||||||
|
@ -11,12 +11,14 @@
|
|||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
|
|
||||||
|
|
||||||
|
static ngx_int_t ngx_ssl_handle_recv(ngx_connection_t *c, int n);
|
||||||
static void ngx_ssl_write_handler(ngx_event_t *wev);
|
static void ngx_ssl_write_handler(ngx_event_t *wev);
|
||||||
static ssize_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size);
|
static ssize_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size);
|
||||||
static void ngx_ssl_read_handler(ngx_event_t *rev);
|
static void ngx_ssl_read_handler(ngx_event_t *rev);
|
||||||
|
|
||||||
|
|
||||||
ngx_int_t ngx_ssl_init(ngx_log_t *log)
|
ngx_int_t
|
||||||
|
ngx_ssl_init(ngx_log_t *log)
|
||||||
{
|
{
|
||||||
ENGINE *engine;
|
ENGINE *engine;
|
||||||
|
|
||||||
@ -28,7 +30,8 @@ ngx_int_t ngx_ssl_init(ngx_log_t *log)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ngx_int_t ngx_ssl_create_session(ngx_ssl_ctx_t *ssl_ctx, ngx_connection_t *c,
|
ngx_int_t
|
||||||
|
ngx_ssl_create_session(ngx_ssl_ctx_t *ssl_ctx, ngx_connection_t *c,
|
||||||
ngx_uint_t flags)
|
ngx_uint_t flags)
|
||||||
{
|
{
|
||||||
ngx_ssl_t *ssl;
|
ngx_ssl_t *ssl;
|
||||||
@ -65,11 +68,23 @@ ngx_int_t ngx_ssl_create_session(ngx_ssl_ctx_t *ssl_ctx, ngx_connection_t *c,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ssize_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size)
|
ssize_t
|
||||||
|
ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size)
|
||||||
{
|
{
|
||||||
int n, sslerr;
|
int n, bytes;
|
||||||
ngx_err_t err;
|
|
||||||
char *handshake;
|
if (c->ssl->last == NGX_ERROR) {
|
||||||
|
return NGX_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
bytes = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SSL_read() may return data in parts, so try to read
|
||||||
|
* until SSL_read() would return no data
|
||||||
|
*/
|
||||||
|
|
||||||
|
for ( ;; ) {
|
||||||
|
|
||||||
n = SSL_read(c->ssl->ssl, buf, size);
|
n = SSL_read(c->ssl->ssl, buf, size);
|
||||||
|
|
||||||
@ -77,6 +92,8 @@ ssize_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size)
|
|||||||
|
|
||||||
if (n > 0) {
|
if (n > 0) {
|
||||||
|
|
||||||
|
bytes += n;
|
||||||
|
|
||||||
#if (NGX_DEBUG)
|
#if (NGX_DEBUG)
|
||||||
|
|
||||||
if (!c->ssl->handshaked && SSL_is_init_finished(c->ssl->ssl)) {
|
if (!c->ssl->handshaked && SSL_is_init_finished(c->ssl->ssl)) {
|
||||||
@ -115,9 +132,42 @@ ssize_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size)
|
|||||||
"SSL no shared ciphers");
|
"SSL no shared ciphers");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
c->ssl->last = ngx_ssl_handle_recv(c, n);
|
||||||
|
|
||||||
|
if (c->ssl->last != NGX_OK) {
|
||||||
|
|
||||||
|
if (bytes) {
|
||||||
|
return bytes;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return c->ssl->last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
size -= n;
|
||||||
|
|
||||||
|
if (size == 0) {
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
buf += n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static ngx_int_t
|
||||||
|
ngx_ssl_handle_recv(ngx_connection_t *c, int n)
|
||||||
|
{
|
||||||
|
int sslerr;
|
||||||
|
ngx_err_t err;
|
||||||
|
char *handshake;
|
||||||
|
|
||||||
|
if (n > 0) {
|
||||||
|
|
||||||
if (c->ssl->saved_write_handler) {
|
if (c->ssl->saved_write_handler) {
|
||||||
|
|
||||||
c->write->event_handler = c->ssl->saved_write_handler;
|
c->write->event_handler = c->ssl->saved_write_handler;
|
||||||
@ -137,7 +187,7 @@ ssize_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size)
|
|||||||
ngx_mutex_unlock(ngx_posted_events_mutex);
|
ngx_mutex_unlock(ngx_posted_events_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return n;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SSL_is_init_finished(c->ssl->ssl)) {
|
if (!SSL_is_init_finished(c->ssl->ssl)) {
|
||||||
@ -197,7 +247,8 @@ ssize_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void ngx_ssl_write_handler(ngx_event_t *wev)
|
static void
|
||||||
|
ngx_ssl_write_handler(ngx_event_t *wev)
|
||||||
{
|
{
|
||||||
ngx_connection_t *c;
|
ngx_connection_t *c;
|
||||||
|
|
||||||
@ -214,8 +265,8 @@ static void ngx_ssl_write_handler(ngx_event_t *wev)
|
|||||||
* the output to decrease a SSL overhead some more.
|
* the output to decrease a SSL overhead some more.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ngx_chain_t *ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in,
|
ngx_chain_t *
|
||||||
off_t limit)
|
ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
ngx_uint_t flush;
|
ngx_uint_t flush;
|
||||||
@ -338,7 +389,8 @@ ngx_chain_t *ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static ssize_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size)
|
static ssize_t
|
||||||
|
ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size)
|
||||||
{
|
{
|
||||||
int n, sslerr;
|
int n, sslerr;
|
||||||
ngx_err_t err;
|
ngx_err_t err;
|
||||||
@ -424,7 +476,8 @@ static ssize_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void ngx_ssl_read_handler(ngx_event_t *rev)
|
static void
|
||||||
|
ngx_ssl_read_handler(ngx_event_t *rev)
|
||||||
{
|
{
|
||||||
ngx_connection_t *c;
|
ngx_connection_t *c;
|
||||||
|
|
||||||
@ -433,7 +486,8 @@ static void ngx_ssl_read_handler(ngx_event_t *rev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ngx_int_t ngx_ssl_shutdown(ngx_connection_t *c)
|
ngx_int_t
|
||||||
|
ngx_ssl_shutdown(ngx_connection_t *c)
|
||||||
{
|
{
|
||||||
int n, sslerr, mode;
|
int n, sslerr, mode;
|
||||||
ngx_uint_t again;
|
ngx_uint_t again;
|
||||||
@ -520,8 +574,8 @@ ngx_int_t ngx_ssl_shutdown(ngx_connection_t *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
|
void
|
||||||
char *fmt, ...)
|
ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...)
|
||||||
{
|
{
|
||||||
u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last;
|
u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
SSL *ssl;
|
SSL *ssl;
|
||||||
|
ngx_int_t last;
|
||||||
ngx_buf_t *buf;
|
ngx_buf_t *buf;
|
||||||
ngx_event_handler_pt saved_read_handler;
|
ngx_event_handler_pt saved_read_handler;
|
||||||
ngx_event_handler_pt saved_write_handler;
|
ngx_event_handler_pt saved_write_handler;
|
||||||
|
@ -128,6 +128,11 @@ static ngx_int_t ngx_http_autoindex_handler(ngx_http_request_t *r)
|
|||||||
return NGX_DECLINED;
|
return NGX_DECLINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: Win32 */
|
||||||
|
if (r->zero_in_uri) {
|
||||||
|
return NGX_DECLINED;
|
||||||
|
}
|
||||||
|
|
||||||
alcf = ngx_http_get_module_loc_conf(r, ngx_http_autoindex_module);
|
alcf = ngx_http_get_module_loc_conf(r, ngx_http_autoindex_module);
|
||||||
|
|
||||||
if (!alcf->enable) {
|
if (!alcf->enable) {
|
||||||
|
@ -63,21 +63,31 @@ static ngx_http_variable_value_t ngx_http_geo_null_value =
|
|||||||
|
|
||||||
/* AF_INET only */
|
/* AF_INET only */
|
||||||
|
|
||||||
static ngx_http_variable_value_t *ngx_http_geo_variable(ngx_http_request_t *r,
|
static ngx_http_variable_value_t *
|
||||||
void *data)
|
ngx_http_geo_variable(ngx_http_request_t *r, void *data)
|
||||||
{
|
{
|
||||||
ngx_radix_tree_t *tree = data;
|
ngx_radix_tree_t *tree = data;
|
||||||
|
|
||||||
struct sockaddr_in *sin;
|
struct sockaddr_in *sin;
|
||||||
|
ngx_http_variable_value_t *var;
|
||||||
|
|
||||||
sin = (struct sockaddr_in *) r->connection->sockaddr;
|
sin = (struct sockaddr_in *) r->connection->sockaddr;
|
||||||
|
|
||||||
return (ngx_http_variable_value_t *)
|
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
||||||
|
"http geo started");
|
||||||
|
|
||||||
|
var = (ngx_http_variable_value_t *)
|
||||||
ngx_radix32tree_find(tree, ntohl(sin->sin_addr.s_addr));
|
ngx_radix32tree_find(tree, ntohl(sin->sin_addr.s_addr));
|
||||||
|
|
||||||
|
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
||||||
|
"http geo: %V %V", &r->connection->addr_text, &var->text);
|
||||||
|
|
||||||
|
return var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static char *ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
static char *
|
||||||
|
ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||||
{
|
{
|
||||||
char *rv;
|
char *rv;
|
||||||
ngx_str_t *value;
|
ngx_str_t *value;
|
||||||
@ -91,7 +101,7 @@ static char *ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(tree = ngx_radix_tree_create(cf->pool, 8))) {
|
if (!(tree = ngx_radix_tree_create(cf->pool, -1))) {
|
||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +158,8 @@ static char *ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||||||
|
|
||||||
/* AF_INET only */
|
/* AF_INET only */
|
||||||
|
|
||||||
static char *ngx_http_geo(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
|
static char *
|
||||||
|
ngx_http_geo(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
|
||||||
{
|
{
|
||||||
ngx_int_t rc, n;
|
ngx_int_t rc, n;
|
||||||
ngx_uint_t i;
|
ngx_uint_t i;
|
||||||
|
@ -216,7 +216,7 @@ static ngx_http_module_t ngx_http_gzip_filter_module_ctx = {
|
|||||||
NULL, /* merge server configuration */
|
NULL, /* merge server configuration */
|
||||||
|
|
||||||
ngx_http_gzip_create_conf, /* create location configuration */
|
ngx_http_gzip_create_conf, /* create location configuration */
|
||||||
ngx_http_gzip_merge_conf, /* merge location configuration */
|
ngx_http_gzip_merge_conf /* merge location configuration */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -120,6 +120,11 @@ static ngx_int_t ngx_http_index_handler(ngx_http_request_t *r)
|
|||||||
return NGX_DECLINED;
|
return NGX_DECLINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: Win32 */
|
||||||
|
if (r->zero_in_uri) {
|
||||||
|
return NGX_DECLINED;
|
||||||
|
}
|
||||||
|
|
||||||
log = r->connection->log;
|
log = r->connection->log;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -518,33 +518,33 @@ static int ngx_http_ssi_copy_opcode(ngx_http_request_t *r,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
static ngx_int_t
|
||||||
ngx_http_ssi_ctx_t *ctx)
|
ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx)
|
||||||
{
|
{
|
||||||
char *p, *last, *end, ch;
|
u_char *p, *last, *end, ch;
|
||||||
ngx_http_ssi_conf_t *conf;
|
ngx_http_ssi_conf_t *conf;
|
||||||
ngx_http_ssi_state_e state;
|
ngx_http_ssi_state_e state;
|
||||||
|
|
||||||
conf = ngx_http_get_module_loc_conf(r, ngx_http_ssi_filter_module);
|
conf = ngx_http_get_module_loc_conf(r, ngx_http_ssi_filter_module);
|
||||||
|
|
||||||
state = ctx->state;
|
state = ctx->state;
|
||||||
p = ctx->pos;
|
|
||||||
end = ctx->buf->last;
|
end = ctx->buf->last;
|
||||||
last = NULL;
|
last = NULL;
|
||||||
|
|
||||||
while (p < end) {
|
for (p = ctx->pos; p < end; p++) {
|
||||||
ch = *p++;
|
|
||||||
|
|
||||||
switch (state) {
|
ch = *p;
|
||||||
|
|
||||||
case ssi_start_state:
|
if (state == ssi_start_state) {
|
||||||
|
|
||||||
/* a tight loop */
|
/* the tight loop */
|
||||||
|
|
||||||
for ( ;; ) {
|
for ( /* void */ ; p < end; p++) {
|
||||||
|
if (ch != '<') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ch == '<') {
|
last = p;
|
||||||
last = p - 1;
|
|
||||||
state = ssi_tag_state;
|
state = ssi_tag_state;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -556,10 +556,11 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
|
|
||||||
return NGX_HTTP_SSI_COPY;
|
return NGX_HTTP_SSI_COPY;
|
||||||
}
|
}
|
||||||
|
|
||||||
ch = *p++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (state) {
|
||||||
|
|
||||||
|
case ssi_start_state:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ssi_tag_state:
|
case ssi_tag_state:
|
||||||
@ -569,7 +570,7 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '<':
|
case '<':
|
||||||
last = p - 1;
|
last = p;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -586,7 +587,7 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '<':
|
case '<':
|
||||||
last = p - 1;
|
last = p;
|
||||||
state = ssi_tag_state;
|
state = ssi_tag_state;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -604,7 +605,7 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '<':
|
case '<':
|
||||||
last = p - 1;
|
last = p;
|
||||||
state = ssi_tag_state;
|
state = ssi_tag_state;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -621,11 +622,10 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
ctx->last = last;
|
ctx->last = last;
|
||||||
ctx->pos = p;
|
ctx->pos = p;
|
||||||
ctx->state = ssi_precommand_state;
|
ctx->state = ssi_precommand_state;
|
||||||
|
break;
|
||||||
return NGX_HTTP_SSI_COPY;
|
|
||||||
|
|
||||||
case '<':
|
case '<':
|
||||||
last = p - 1;
|
last = p;
|
||||||
state = ssi_tag_state;
|
state = ssi_tag_state;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -645,14 +645,14 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
ctx->command.len = 1;
|
||||||
ctx->command.data =
|
ctx->command.data =
|
||||||
ngx_palloc(r->pool, NGX_HTTP_SSI_COMMAND_LEN + 1);
|
ngx_palloc(r->pool, NGX_HTTP_SSI_COMMAND_LEN);
|
||||||
if (ctx->command.data == NULL) {
|
if (ctx->command.data == NULL) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->command.data[0] = ch;
|
ctx->command.data[0] = ch;
|
||||||
ctx->command.len = 1;
|
|
||||||
state = ssi_command_state;
|
state = ssi_command_state;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -665,20 +665,15 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
case CR:
|
case CR:
|
||||||
case LF:
|
case LF:
|
||||||
case '\t':
|
case '\t':
|
||||||
ctx->command.data[ctx->command.len] = 0;
|
|
||||||
state = ssi_preparam_state;
|
state = ssi_preparam_state;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '-':
|
case '-':
|
||||||
ctx->command.data[ctx->command.len] = 0;
|
|
||||||
state = ssi_comment_end0_state;
|
state = ssi_comment_end0_state;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (ctx->command.len >= NGX_HTTP_SSI_COMMAND_LEN) {
|
if (ctx->command.len == NGX_HTTP_SSI_COMMAND_LEN) {
|
||||||
ctx->command.data[NGX_HTTP_SSI_COMMAND_LEN] = 0;
|
|
||||||
|
|
||||||
ctx->last = last;
|
|
||||||
ctx->pos = p;
|
ctx->pos = p;
|
||||||
ctx->state = ssi_error_state;
|
ctx->state = ssi_error_state;
|
||||||
|
|
||||||
@ -704,28 +699,30 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (ctx->params.elts == NULL) {
|
if (ctx->params.elts == NULL) {
|
||||||
ngx_init_array(ctx->params, r->pool,
|
if (ngx_array_init(&ctx->params = r->pool,
|
||||||
5, sizeof(ngx_table_elt_t), NGX_ERROR);
|
4, sizeof(ngx_table_elt_t)) = NGX_ERROR)
|
||||||
|
{
|
||||||
|
return NGX_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(ctx->param = ngx_push_array(&ctx->params))) {
|
if (!(ctx->param = ngx_array_push(&ctx->params))) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx->param->key.len = 1;
|
||||||
ctx->param->key.data =
|
ctx->param->key.data =
|
||||||
ngx_palloc(r->pool, NGX_HTTP_SSI_PARAM_LEN + 1);
|
ngx_palloc(r->pool, NGX_HTTP_SSI_PARAM_LEN);
|
||||||
if (ctx->param->key.data == NULL) {
|
if (ctx->param->key.data == NULL) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
ctx->param->key.data[0] = ch;
|
ctx->param->key.data[0] = ch;
|
||||||
ctx->param->key.len = 1;
|
|
||||||
|
|
||||||
ctx->param->value.data =
|
ctx->param->value.len = 0;
|
||||||
ngx_palloc(r->pool, conf->value_len + 1);
|
ctx->param->value.data = ngx_palloc(r->pool, conf->value_len);
|
||||||
if (ctx->param->value.data == NULL) {
|
if (ctx->param->value.data == NULL) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
ctx->param->value.len = 0;
|
|
||||||
|
|
||||||
state = ssi_param_state;
|
state = ssi_param_state;
|
||||||
break;
|
break;
|
||||||
@ -739,27 +736,21 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
case CR:
|
case CR:
|
||||||
case LF:
|
case LF:
|
||||||
case '\t':
|
case '\t':
|
||||||
ctx->param->key.data[ctx->param->key.len] = 0;
|
|
||||||
state = ssi_preequal_state;
|
state = ssi_preequal_state;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '=':
|
case '=':
|
||||||
ctx->param->key.data[ctx->param->key.len] = 0;
|
|
||||||
state = ssi_prevalue_state;
|
state = ssi_prevalue_state;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '-':
|
case '-':
|
||||||
ctx->last = last;
|
|
||||||
ctx->pos = p;
|
ctx->pos = p;
|
||||||
ctx->state = ssi_error_end0_state;
|
ctx->state = ssi_error_end0_state;
|
||||||
|
|
||||||
return NGX_HTTP_SSI_INVALID_PARAM;
|
return NGX_HTTP_SSI_INVALID_PARAM;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (ctx->param->key.len >= NGX_HTTP_SSI_PARAM_LEN) {
|
if (ctx->param->key.len == NGX_HTTP_SSI_PARAM_LEN) {
|
||||||
ctx->param->key.data[NGX_HTTP_SSI_PARAM_LEN] = 0;
|
|
||||||
|
|
||||||
ctx->last = last;
|
|
||||||
ctx->pos = p;
|
ctx->pos = p;
|
||||||
ctx->state = ssi_error_state;
|
ctx->state = ssi_error_state;
|
||||||
|
|
||||||
@ -784,7 +775,6 @@ static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '-':
|
case '-':
|
||||||
ctx->last = last;
|
|
||||||
ctx->pos = p;
|
ctx->pos = p;
|
||||||
ctx->state = ssi_error_end0_state;
|
ctx->state = ssi_error_end0_state;
|
||||||
|
|
||||||
|
@ -87,6 +87,11 @@ static ngx_int_t ngx_http_static_handler(ngx_http_request_t *r)
|
|||||||
return NGX_DECLINED;
|
return NGX_DECLINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: Win32 */
|
||||||
|
if (r->zero_in_uri) {
|
||||||
|
return NGX_DECLINED;
|
||||||
|
}
|
||||||
|
|
||||||
if (r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) {
|
if (r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) {
|
||||||
return NGX_HTTP_NOT_ALLOWED;
|
return NGX_HTTP_NOT_ALLOWED;
|
||||||
}
|
}
|
||||||
|
@ -415,6 +415,8 @@ ngx_http_handler(ngx_http_request_t *r)
|
|||||||
|
|
||||||
r->uri_changed = 1;
|
r->uri_changed = 1;
|
||||||
r->uri_changes = 11;
|
r->uri_changes = 11;
|
||||||
|
r->phase = NGX_HTTP_REWRITE_PHASE;
|
||||||
|
r->phase_handler = 0;
|
||||||
|
|
||||||
ngx_http_core_run_phases(r);
|
ngx_http_core_run_phases(r);
|
||||||
}
|
}
|
||||||
@ -447,11 +449,7 @@ ngx_http_core_run_phases(ngx_http_request_t *r)
|
|||||||
|
|
||||||
for (/* void */; r->phase < NGX_HTTP_LAST_PHASE; r->phase++) {
|
for (/* void */; r->phase < NGX_HTTP_LAST_PHASE; r->phase++) {
|
||||||
|
|
||||||
if (r->phase == NGX_HTTP_FIND_CONFIG_PHASE && !r->uri_changed) {
|
if (r->phase == NGX_HTTP_REWRITE_PHASE + 1 && r->uri_changed) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (r->phase == NGX_HTTP_FIND_CONFIG_PHASE + 1 && r->uri_changed) {
|
|
||||||
|
|
||||||
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
||||||
"uri changes: %d", r->uri_changes);
|
"uri changes: %d", r->uri_changes);
|
||||||
@ -472,8 +470,7 @@ ngx_http_core_run_phases(ngx_http_request_t *r)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
r->uri_changed = 0;
|
r->phase = NGX_HTTP_FIND_CONFIG_PHASE;
|
||||||
r->phase = NGX_HTTP_REWRITE_PHASE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r->phase == NGX_HTTP_CONTENT_PHASE && r->content_handler) {
|
if (r->phase == NGX_HTTP_CONTENT_PHASE && r->content_handler) {
|
||||||
@ -525,7 +522,7 @@ ngx_http_core_run_phases(ngx_http_request_t *r)
|
|||||||
|
|
||||||
/* no content handler was found */
|
/* no content handler was found */
|
||||||
|
|
||||||
if (r->uri.data[r->uri.len - 1] == '/') {
|
if (r->uri.data[r->uri.len - 1] == '/' && !r->zero_in_uri) {
|
||||||
|
|
||||||
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
|
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
|
||||||
|
|
||||||
@ -550,6 +547,9 @@ ngx_http_find_location_config(ngx_http_request_t *r)
|
|||||||
ngx_http_core_loc_conf_t *clcf;
|
ngx_http_core_loc_conf_t *clcf;
|
||||||
ngx_http_core_srv_conf_t *cscf;
|
ngx_http_core_srv_conf_t *cscf;
|
||||||
|
|
||||||
|
r->content_handler = NULL;
|
||||||
|
r->uri_changed = 0;
|
||||||
|
|
||||||
cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
|
cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
|
||||||
|
|
||||||
rc = ngx_http_core_find_location(r, &cscf->locations, 0);
|
rc = ngx_http_core_find_location(r, &cscf->locations, 0);
|
||||||
@ -955,10 +955,6 @@ ngx_http_internal_redirect(ngx_http_request_t *r,
|
|||||||
cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
|
cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
|
||||||
r->loc_conf = cscf->ctx->loc_conf;
|
r->loc_conf = cscf->ctx->loc_conf;
|
||||||
|
|
||||||
r->phase = 0;
|
|
||||||
r->phase_handler = 0;
|
|
||||||
r->content_handler = NULL;
|
|
||||||
|
|
||||||
ngx_http_handler(r);
|
ngx_http_handler(r);
|
||||||
|
|
||||||
return NGX_DONE;
|
return NGX_DONE;
|
||||||
|
@ -25,9 +25,9 @@ typedef struct {
|
|||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NGX_HTTP_REWRITE_PHASE = 0,
|
NGX_HTTP_FIND_CONFIG_PHASE = 0,
|
||||||
|
|
||||||
NGX_HTTP_FIND_CONFIG_PHASE,
|
NGX_HTTP_REWRITE_PHASE,
|
||||||
|
|
||||||
NGX_HTTP_ACCESS_PHASE,
|
NGX_HTTP_ACCESS_PHASE,
|
||||||
NGX_HTTP_CONTENT_PHASE,
|
NGX_HTTP_CONTENT_PHASE,
|
||||||
|
@ -137,7 +137,7 @@ ngx_http_log_op_name_t ngx_http_log_fmt_ops[] = {
|
|||||||
{ ngx_string("addr"), INET_ADDRSTRLEN - 1, NULL, NULL, ngx_http_log_addr },
|
{ ngx_string("addr"), INET_ADDRSTRLEN - 1, NULL, NULL, ngx_http_log_addr },
|
||||||
{ ngx_string("conn"), NGX_INT32_LEN, NULL, NULL, ngx_http_log_connection },
|
{ ngx_string("conn"), NGX_INT32_LEN, NULL, NULL, ngx_http_log_connection },
|
||||||
{ ngx_string("pipe"), 1, NULL, NULL, ngx_http_log_pipe },
|
{ ngx_string("pipe"), 1, NULL, NULL, ngx_http_log_pipe },
|
||||||
{ ngx_string("time"), sizeof("28/Sep/1970:12:00:00") - 1,
|
{ ngx_string("time"), sizeof("28/Sep/1970:12:00:00 +0600") - 1,
|
||||||
NULL, NULL, ngx_http_log_time },
|
NULL, NULL, ngx_http_log_time },
|
||||||
{ ngx_string("msec"), NGX_TIME_T_LEN + 4, NULL, NULL, ngx_http_log_msec },
|
{ ngx_string("msec"), NGX_TIME_T_LEN + 4, NULL, NULL, ngx_http_log_msec },
|
||||||
{ ngx_string("status"), 3, NULL, NULL, ngx_http_log_status },
|
{ ngx_string("status"), 3, NULL, NULL, ngx_http_log_status },
|
||||||
|
@ -109,6 +109,12 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
|
|
||||||
/* space* before URI */
|
/* space* before URI */
|
||||||
case sw_spaces_before_uri:
|
case sw_spaces_before_uri:
|
||||||
|
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')) {
|
||||||
|
r->schema_start = p;
|
||||||
|
state = sw_schema;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case '/':
|
case '/':
|
||||||
r->uri_start = p;
|
r->uri_start = p;
|
||||||
@ -117,25 +123,21 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
case ' ':
|
case ' ':
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')) {
|
|
||||||
r->schema_start = p;
|
|
||||||
state = sw_schema;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sw_schema:
|
case sw_schema:
|
||||||
|
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case ':':
|
case ':':
|
||||||
r->schema_end = p;
|
r->schema_end = p;
|
||||||
state = sw_schema_slash;
|
state = sw_schema_slash;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -162,6 +164,12 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case sw_host:
|
case sw_host:
|
||||||
|
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')
|
||||||
|
|| (ch >= '0' && ch <= '9') || ch == '.' || ch == '-')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case ':':
|
case ':':
|
||||||
r->host_end = p;
|
r->host_end = p;
|
||||||
@ -173,16 +181,15 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
state = sw_after_slash_in_uri;
|
state = sw_after_slash_in_uri;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')
|
|
||||||
|| (ch >= '0' && ch <= '9') || ch == '.' || ch == '-')
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sw_port:
|
case sw_port:
|
||||||
|
if (ch >= '0' && ch <= '9') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case '/':
|
case '/':
|
||||||
r->port_end = p;
|
r->port_end = p;
|
||||||
@ -190,16 +197,26 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
state = sw_after_slash_in_uri;
|
state = sw_after_slash_in_uri;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (ch < '0' && ch > '9') {
|
|
||||||
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* check "/.", "//", "%", and "\" (Win32) in URI */
|
/* check "/.", "//", "%", and "\" (Win32) in URI */
|
||||||
case sw_after_slash_in_uri:
|
case sw_after_slash_in_uri:
|
||||||
|
|
||||||
|
if ((ch >= 'a' && ch <= 'z')
|
||||||
|
|| (ch >= 'A' && ch <= 'Z')
|
||||||
|
|| (ch >= '0' && ch <= '9'))
|
||||||
|
{
|
||||||
|
state = sw_check_uri;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
case ' ':
|
||||||
|
r->uri_end = p;
|
||||||
|
state = sw_http_09;
|
||||||
|
break;
|
||||||
case CR:
|
case CR:
|
||||||
r->uri_end = p;
|
r->uri_end = p;
|
||||||
r->http_minor = 9;
|
r->http_minor = 9;
|
||||||
@ -209,10 +226,6 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
r->uri_end = p;
|
r->uri_end = p;
|
||||||
r->http_minor = 9;
|
r->http_minor = 9;
|
||||||
goto done;
|
goto done;
|
||||||
case ' ':
|
|
||||||
r->uri_end = p;
|
|
||||||
state = sw_http_09;
|
|
||||||
break;
|
|
||||||
case '.':
|
case '.':
|
||||||
r->complex_uri = 1;
|
r->complex_uri = 1;
|
||||||
state = sw_uri;
|
state = sw_uri;
|
||||||
@ -221,20 +234,25 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
r->quoted_uri = 1;
|
r->quoted_uri = 1;
|
||||||
state = sw_uri;
|
state = sw_uri;
|
||||||
break;
|
break;
|
||||||
|
case '/':
|
||||||
|
r->complex_uri = 1;
|
||||||
|
state = sw_uri;
|
||||||
|
break;
|
||||||
#if (NGX_WIN32)
|
#if (NGX_WIN32)
|
||||||
case '\\':
|
case '\\':
|
||||||
r->complex_uri = 1;
|
r->complex_uri = 1;
|
||||||
|
state = sw_uri;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case '/':
|
case '?':
|
||||||
r->complex_uri = 1;
|
r->args_start = p + 1;
|
||||||
|
state = sw_uri;
|
||||||
break;
|
break;
|
||||||
case '+':
|
case '+':
|
||||||
r->plus_in_uri = 1;
|
r->plus_in_uri = 1;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '\0':
|
||||||
r->args_start = p + 1;
|
r->zero_in_uri = 1;
|
||||||
state = sw_uri;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
state = sw_check_uri;
|
state = sw_check_uri;
|
||||||
@ -244,7 +262,26 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
|
|
||||||
/* check "/", "%" and "\" (Win32) in URI */
|
/* check "/", "%" and "\" (Win32) in URI */
|
||||||
case sw_check_uri:
|
case sw_check_uri:
|
||||||
|
|
||||||
|
if ((ch >= 'a' && ch <= 'z')
|
||||||
|
|| (ch >= 'A' && ch <= 'Z')
|
||||||
|
|| (ch >= '0' && ch <= '9'))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
case '/':
|
||||||
|
r->uri_ext = NULL;
|
||||||
|
state = sw_after_slash_in_uri;
|
||||||
|
break;
|
||||||
|
case '.':
|
||||||
|
r->uri_ext = p + 1;
|
||||||
|
break;
|
||||||
|
case ' ':
|
||||||
|
r->uri_end = p;
|
||||||
|
state = sw_http_09;
|
||||||
|
break;
|
||||||
case CR:
|
case CR:
|
||||||
r->uri_end = p;
|
r->uri_end = p;
|
||||||
r->http_minor = 9;
|
r->http_minor = 9;
|
||||||
@ -254,40 +291,36 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
r->uri_end = p;
|
r->uri_end = p;
|
||||||
r->http_minor = 9;
|
r->http_minor = 9;
|
||||||
goto done;
|
goto done;
|
||||||
case ' ':
|
|
||||||
r->uri_end = p;
|
|
||||||
state = sw_http_09;
|
|
||||||
break;
|
|
||||||
case '.':
|
|
||||||
r->uri_ext = p + 1;
|
|
||||||
break;
|
|
||||||
#if (NGX_WIN32)
|
#if (NGX_WIN32)
|
||||||
case '\\':
|
case '\\':
|
||||||
r->complex_uri = 1;
|
r->complex_uri = 1;
|
||||||
state = sw_after_slash_in_uri;
|
state = sw_after_slash_in_uri;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case '/':
|
|
||||||
r->uri_ext = NULL;
|
|
||||||
state = sw_after_slash_in_uri;
|
|
||||||
break;
|
|
||||||
case '+':
|
|
||||||
r->plus_in_uri = 1;
|
|
||||||
break;
|
|
||||||
case '%':
|
case '%':
|
||||||
r->quoted_uri = 1;
|
r->quoted_uri = 1;
|
||||||
state = sw_uri;
|
state = sw_uri;
|
||||||
break;
|
break;
|
||||||
|
case '+':
|
||||||
|
r->plus_in_uri = 1;
|
||||||
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
r->args_start = p + 1;
|
r->args_start = p + 1;
|
||||||
state = sw_uri;
|
state = sw_uri;
|
||||||
break;
|
break;
|
||||||
|
case '\0':
|
||||||
|
r->zero_in_uri = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* URI */
|
/* URI */
|
||||||
case sw_uri:
|
case sw_uri:
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
case ' ':
|
||||||
|
r->uri_end = p;
|
||||||
|
state = sw_http_09;
|
||||||
|
break;
|
||||||
case CR:
|
case CR:
|
||||||
r->uri_end = p;
|
r->uri_end = p;
|
||||||
r->http_minor = 9;
|
r->http_minor = 9;
|
||||||
@ -300,9 +333,8 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
case '+':
|
case '+':
|
||||||
r->plus_in_uri = 1;
|
r->plus_in_uri = 1;
|
||||||
break;
|
break;
|
||||||
case ' ':
|
case '\0':
|
||||||
r->uri_end = p;
|
r->zero_in_uri = 1;
|
||||||
state = sw_http_09;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -946,12 +978,20 @@ ngx_int_t ngx_http_parse_complex_uri(ngx_http_request_t *r)
|
|||||||
case sw_quoted_second:
|
case sw_quoted_second:
|
||||||
if (ch >= '0' && ch <= '9') {
|
if (ch >= '0' && ch <= '9') {
|
||||||
ch = (u_char) ((decoded << 4) + ch - '0');
|
ch = (u_char) ((decoded << 4) + ch - '0');
|
||||||
|
|
||||||
if (ch == '%') {
|
if (ch == '%') {
|
||||||
state = sw_usual;
|
state = sw_usual;
|
||||||
*u++ = ch;
|
*u++ = ch;
|
||||||
ch = *p++;
|
ch = *p++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ch == '\0') {
|
||||||
|
r->zero_in_uri = 1;
|
||||||
|
*u++ = ch;
|
||||||
|
ch = *p++;
|
||||||
|
}
|
||||||
|
|
||||||
state = quoted_state;
|
state = quoted_state;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,13 @@ ngx_http_header_t ngx_http_headers_in[] = {
|
|||||||
{ ngx_string("X-URL"), offsetof(ngx_http_headers_in_t, x_url) },
|
{ ngx_string("X-URL"), offsetof(ngx_http_headers_in_t, x_url) },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (NGX_HTTP_HEADERS)
|
||||||
|
{ ngx_string("Accept"), offsetof(ngx_http_headers_in_t, accept) },
|
||||||
|
{ ngx_string("Accept-Language"),
|
||||||
|
offsetof(ngx_http_headers_in_t, accept_language) },
|
||||||
|
{ ngx_string("Via"), offsetof(ngx_http_headers_in_t, via) },
|
||||||
|
#endif
|
||||||
|
|
||||||
{ ngx_null_string, 0 }
|
{ ngx_null_string, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -152,6 +152,11 @@ typedef struct {
|
|||||||
ngx_table_elt_t *x_url;
|
ngx_table_elt_t *x_url;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (NGX_HTTP_HEADERS)
|
||||||
|
ngx_table_elt_t *accept;
|
||||||
|
ngx_table_elt_t *accept_language;
|
||||||
|
#endif
|
||||||
|
|
||||||
ngx_array_t cookies;
|
ngx_array_t cookies;
|
||||||
|
|
||||||
size_t host_name_len;
|
size_t host_name_len;
|
||||||
@ -325,6 +330,9 @@ struct ngx_http_request_s {
|
|||||||
/* URI with "+" */
|
/* URI with "+" */
|
||||||
unsigned plus_in_uri:1;
|
unsigned plus_in_uri:1;
|
||||||
|
|
||||||
|
/* URI with "\0" or "%00" */
|
||||||
|
unsigned zero_in_uri:1;
|
||||||
|
|
||||||
unsigned uri_changed:1;
|
unsigned uri_changed:1;
|
||||||
unsigned uri_changes:4;
|
unsigned uri_changes:4;
|
||||||
|
|
||||||
|
@ -94,6 +94,7 @@ ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
cl->buf->file_last);
|
cl->buf->file_last);
|
||||||
|
|
||||||
ngx_debug_point();
|
ngx_debug_point();
|
||||||
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -144,6 +145,7 @@ ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
cl->buf->file_last);
|
cl->buf->file_last);
|
||||||
|
|
||||||
ngx_debug_point();
|
ngx_debug_point();
|
||||||
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -102,6 +102,8 @@ ngx_chain_t *ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in,
|
|||||||
cl->buf->file_last);
|
cl->buf->file_last);
|
||||||
|
|
||||||
ngx_debug_point();
|
ngx_debug_point();
|
||||||
|
|
||||||
|
return NGX_CHAIN_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user