Skip to content

Commit

Permalink
nginx-0.1.3-RELEASE import
Browse files Browse the repository at this point in the history
    *) Feature: the ngx_http_autoindex_module and the autoindex directive.

    *) Feature: the proxy_set_x_url directive.

    *) Bugfix: proxy module may get caught in an endless loop when sendfile
       is not used.
  • Loading branch information
igorsysoev committed Oct 25, 2004
1 parent 4925ed8 commit 723e6cc
Show file tree
Hide file tree
Showing 30 changed files with 780 additions and 57 deletions.
5 changes: 3 additions & 2 deletions auto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ fi

. auto/cc/conf
. auto/os/conf
. auto/modules
. auto/lib/conf

if [ "$PLATFORM" != win32 ]; then
. auto/threads
fi

. auto/modules
. auto/lib/conf

. auto/make
. auto/lib/make
. auto/install
Expand Down
10 changes: 9 additions & 1 deletion auto/modules
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ if [ $HTTP_USERID = YES ]; then
HTTP_SRCS="$HTTP_SRCS $HTTP_USERID_SRCS"
fi

HTTP_MODULES="$HTTP_MODULES $HTTP_STATIC_MODULE $HTTP_INDEX_MODULE"
HTTP_MODULES="$HTTP_MODULES $HTTP_STATIC_MODULE"

if [ $HTTP_AUTOINDEX = YES ]; then
have=NGX_HTTP_AUTOINDEX . auto/have
HTTP_MODULES="$HTTP_MODULES $HTTP_AUTOINDEX_MODULE"
HTTP_SRCS="$HTTP_SRCS $HTTP_AUTOINDEX_SRCS"
fi

HTTP_MODULES="$HTTP_MODULES $HTTP_INDEX_MODULE"

if [ $HTTP_ACCESS = YES ]; then
have=NGX_HTTP_ACCESS . auto/have
Expand Down
2 changes: 2 additions & 0 deletions auto/options
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ HTTP_SSL=NO
HTTP_SSI=NO
HTTP_ACCESS=YES
HTTP_USERID=YES
HTTP_AUTOINDEX=YES
HTTP_STATUS=NO
HTTP_REWRITE=YES
HTTP_PROXY=YES
Expand Down Expand Up @@ -107,6 +108,7 @@ do
--without-http_ssi_module) HTTP_SSI=NO ;;
--without-http_userid_module) HTTP_USERID=NO ;;
--without-http_access_module) HTTP_ACCESS=NO ;;
--without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
--without-http_status_module) HTTP_STATUS=NO ;;
--without-http_rewrite_module) HTTP_REWRITE=NO ;;
--without-http_proxy_module) HTTP_PROXY=NO ;;
Expand Down
4 changes: 4 additions & 0 deletions auto/sources
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ HTTP_ACCESS_MODULE=ngx_http_access_module
HTTP_ACCESS_SRCS=src/http/modules/ngx_http_access_handler.c


HTTP_AUTOINDEX_MODULE=ngx_http_autoindex_module
HTTP_AUTOINDEX_SRCS=src/http/modules/ngx_http_autoindex_handler.c


HTTP_STATUS_MODULE=ngx_http_status_module
HTTP_STATUS_SRCS=src/http/modules/ngx_http_status_handler.c

Expand Down
10 changes: 10 additions & 0 deletions auto/summary
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ echo
echo "Configuration summary"


case $USE_THREADS in
rfork) echo " + using rfork()ed threads" ;;
pthreads) echo " + using libpthread threads library" ;;
libthr) echo " + using FreeBSD libthr threads library" ;;
libc_r) echo " + using FreeBSD libc_r threads library" ;;
linuxthreads) echo " + using FreeBSD LinuxThreads port library" ;;
NO) echo " + threads are not used" ;;
*) echo " + using lib$USE_THREADS threads library" ;;
esac

if [ $USE_PCRE = DISABLED ]; then
echo " + PCRE library is disabled"

Expand Down
35 changes: 21 additions & 14 deletions auto/threads
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@ case $USE_THREADS in
esac
;;

pthread)
pthreads)
have=NGX_THREADS . auto/have
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
CORE_LIBS="$CORE_LIBS -lpthread"
;;

freebsd4)
libthr)
have=NGX_THREADS . auto/have
CFLAGS="$CFLAGS -pthread"
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
CORE_LIBS="$CORE_LIBS -pthread"
CORE_LIBS="$CORE_LIBS -lthr"
;;

linuxthreads)
Expand All @@ -42,22 +41,30 @@ case $USE_THREADS in
CORE_LIBS="$CORE_LIBS -L /usr/local/lib -llthread -llgcc_r"
;;

lc_r)
have=NGX_THREADS . auto/have
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
CORE_LIBS="$CORE_LIBS -lc_r"
libc_r)
case $PLATFORM in
FreeBSD:[34]*)
have=NGX_THREADS . auto/have
CFLAGS="$CFLAGS -pthread"
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
CORE_LIBS="$CORE_LIBS -pthread"
;;

FreeBSD:5*)
have=NGX_THREADS . auto/have
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
CORE_LIBS="$CORE_LIBS -lc_r"
;;
esac
;;

lthr)
have=NGX_THREADS . auto/have
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
CORE_LIBS="$CORE_LIBS -lthr"
NO)
;;

lkse)
*)
have=NGX_THREADS . auto/have
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
CORE_LIBS="$CORE_LIBS -lkse"
CORE_LIBS="$CORE_LIBS -l$USE_THREADS"
;;

esac
40 changes: 36 additions & 4 deletions docs/xml/nginx/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,38 @@
title="nginx">


<changes ver="0.1.3" date="25.10.2004">

<change type="feature">
<para lang="ru">
ÍÏÄÕÌØ ngx_http_autoindex_module É ÄÉÒÅËÔÉ×Á autoindex.
</para>
<para lang="en">
the ngx_http_autoindex_module and the autoindex directive.
</para>
</change>

<change type="feature">
<para lang="ru">
ÄÉÒÅËÔÉ×Á proxy_set_x_url.
</para>
<para lang="en">
the proxy_set_x_url directive.
</para>
</change>

<change type="bugfix">
<para lang="ru">
ÍÏÄÕÌØ ÐÒÏËÓÉÒÏ×ÁÎÉÉ ÍÏÇ ÐÒÉ×ÅÓÔÉ Ë ÚÁÃÉËÌÉ×ÁÎÉÀ, ÅÓÌÉ ÎÅ ÉÓÐÏÌØÚÏ×ÁÌÓÑ
sendfile.
</para>
<para lang="en">
proxy module may get caught in an endless loop when sendfile is not used.
</para>
</change>

</changes>

<changes ver="0.1.2" date="21.10.2004">

<change type="feature">
Expand Down Expand Up @@ -38,12 +70,12 @@ the portability improvements.
<change type="bugfix">
<para lang="ru">
ÎÅÌØÚÑ ÐÅÒÅËÏÎÆÉÇÕÒÉÒÏ×ÁÔØ nginx, ÅÓÌÉ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÙÊ ÆÁÊÌ ÕËÁÚÁÎ
× ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÅ,
× ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÅ;
ÏÛÉÂËÁ ÐÏÑ×ÉÌÁÓØ × 0.1.1.
</para>
<para lang="en">
if configuration file was set in command line, the reconfiguration
was impossible,
was impossible;
bug appeared in 0.1.1.
</para>
</change>
Expand All @@ -61,12 +93,12 @@ proxy module may get caught in an endless loop when sendfile is not used.
<change type="bugfix">
<para lang="ru">
ÐÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ sendfile ÔÅËÓÔ ÏÔ×ÅÔÁ ÎÅ ÐÅÒÅËÏÄÉÒÏ×ÁÌÓÑ
ÓÏÇÌÁÓÎÏ ÄÉÒÅËÔÉ×ÁÍ ÍÏÄÕÌÑ charset,
ÓÏÇÌÁÓÎÏ ÄÉÒÅËÔÉ×ÁÍ ÍÏÄÕÌÑ charset;
ÏÛÉÂËÁ ÐÏÑ×ÉÌÁÓØ × 0.1.1.
</para>
<para lang="en">
with sendfile the response was not recoded according to the charset
module directives,
module directives;
bug appeared in 0.1.1.
</para>
</change>
Expand Down
2 changes: 1 addition & 1 deletion src/core/nginx.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_


#define NGINX_VER "nginx/0.1.2"
#define NGINX_VER "nginx/0.1.3"

#define NGINX_VAR "NGINX"
#define NGX_NEWPID_EXT ".newbin"
Expand Down
2 changes: 1 addition & 1 deletion src/core/ngx_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct ngx_file_s {

ngx_log_t *log;

unsigned info_valid:1;
ngx_uint_t valid_info:1; /* unsigned valid_info:1; */
};

#define NGX_MAX_PATH_LEVEL 3
Expand Down
2 changes: 1 addition & 1 deletion src/core/ngx_garbage_collector.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static int ngx_collect_garbage(ngx_gc_t *ctx, ngx_str_t *dname, int level)
ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->log, 0,
"gc path: \"%s\"", fname.data);

if (!dir.info_valid) {
if (!dir.valid_info) {
if (ngx_de_info(fname.data, &dir) == NGX_FILE_ERROR) {
ngx_log_error(NGX_LOG_CRIT, ctx->log, ngx_errno,
ngx_de_info_n " \"%s\" failed", fname.data);
Expand Down
8 changes: 8 additions & 0 deletions src/core/ngx_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ u_char *ngx_cpystrn(u_char *dst, u_char *src, size_t n)
* %[0][width]ui ngx_uint_t
* %[0][width]uxi ngx_uint_t in hex
* %s null-terminated string
* %c char
* %% %
*
*/
Expand Down Expand Up @@ -223,6 +224,13 @@ u_char *ngx_sprintf(u_char *buf, char *fmt, ...)

continue;

case 'c':
d = va_arg(arg, int);
*buf++ = (u_char) (d & 0xff);
fmt++;

continue;

case '%':
*buf++ = '%';
fmt++;
Expand Down
2 changes: 1 addition & 1 deletion src/event/ngx_event_connect.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ typedef struct {
ngx_int_t current;
ngx_int_t number;
ngx_int_t max_fails;
ngx_int_t fail_timeout;
time_t fail_timeout;
ngx_int_t last_cached;

/* ngx_mutex_t *mutex; */
Expand Down
2 changes: 2 additions & 0 deletions src/event/ngx_event_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,8 @@ static ngx_int_t ngx_event_pipe_write_chain_to_temp_file(ngx_event_pipe_t *p)

b->in_file = 1;
b->temp_file = 1;
b->temporary = 0;
b->recycled = 0;

ngx_chain_add_link(p->out, p->last_out, cl);

Expand Down
Loading

0 comments on commit 723e6cc

Please sign in to comment.