Skip to content

Commit

Permalink
nginx-0.3.44-RELEASE import
Browse files Browse the repository at this point in the history
    *) Feature: the "wait" parameter in the "include" SSI command.

    *) Feature: the Ukrainian and Byelorussian characters were added to
       koi-win conversion table.

    *) Bugfix: in the SSI.
  • Loading branch information
igorsysoev committed May 4, 2006
1 parent 2cca46c commit ac72bd1
Show file tree
Hide file tree
Showing 26 changed files with 438 additions and 129 deletions.
3 changes: 2 additions & 1 deletion auto/feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ END
ngx_found=no

if test -n "$ngx_feature_name"; then
ngx_have_feature=`echo $ngx_feature_name | tr '[a-z]' '[A-Z]'`
ngx_have_feature=`echo $ngx_feature_name \
| tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
fi

cat << END > $NGX_AUTOTEST.c
Expand Down
4 changes: 2 additions & 2 deletions auto/include
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ if [ -x $NGX_AUTOTEST ]; then

echo " found"

ngx_name=`echo $ngx_include | sed -e 's/\./_/' -e 's/\//_/' \
| tr '[a-z]' '[A-Z]'`
ngx_name=`echo $ngx_include \
| tr abcdefghijklmnopqrstuvwxyz/. ABCDEFGHIJKLMNOPQRSTUVWXYZ__`


have=NGX_HAVE_$ngx_name . auto/have_headers
Expand Down
14 changes: 14 additions & 0 deletions conf/koi-win
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,22 @@ charset_map koi8-r windows-1251 {
9E B7 ; # &middot;

A3 B8 ; # small yo
A4 BA ; # small Ukrainian ye

A6 B3 ; # small Ukrainian i
A7 BF ; # small Ukrainian j

AD B4 ; # small Ukrainian soft g
AE A2 ; # small Byelorussian short u

B3 A8 ; # capital YO
B4 AA ; # capital Ukrainian YE

B6 B2 ; # capital Ukrainian I
B7 AF ; # capital Ukrainian J

BD A5 ; # capital Ukrainian soft G
BE A1 ; # capital Byelorussian short U

BF A9 ; # (C)

Expand Down
6 changes: 4 additions & 2 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ http {

sendfile on;
#tcp_nopush on;
#tcp_nodelay on;

#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;

#gzip on;

Expand Down Expand Up @@ -60,7 +61,8 @@ http {
# include conf/fastcgi_params;
#}

# deny access to .htaccess files
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
Expand Down
33 changes: 33 additions & 0 deletions docs/xml/nginx/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,39 @@
<title lang="en">nginx changelog</title>


<changes ver="0.3.44" date="04.05.2006">

<change type="feature">
<para lang="ru">
ÐÁÒÁÍÅÔÒ wait × ËÏÍÁÎÄÅ SSI inlcude.
</para>
<para lang="en">
the "wait" parameter in the SSI "include" command.
</para>
</change>

<change type="feature">
<para lang="ru">
× ÔÁÂÌÉÃÕ ÐÅÒÅËÏÄÉÒÏ×ËÉ koi-win ÄÏÂÁ×ÌÅÎÙ ÕËÒÁÉÎÓËÉÅ É ÂÅÌÏÒÕÓÓËÉÅ ÓÉÍ×ÏÌÙ.
</para>
<para lang="en">
the Ukrainian and Byelorussian characters were added to koi-win conversion
table.
</para>
</change>

<change type="bugfix">
<para lang="ru">
× SSI.
</para>
<para lang="en">
in the SSI.
</para>
</change>

</changes>


<changes ver="0.3.43" date="26.04.2006">

<change type="bugfix">
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.3.43"
#define NGINX_VER "nginx/0.3.44"

#define NGINX_VAR "NGINX"
#define NGX_OLDPID_EXT ".oldbin"
Expand Down
6 changes: 0 additions & 6 deletions src/core/ngx_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,6 @@ ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, ngx_chain_t *in)
}

while (in) {

if (ngx_buf_sync_only(in->buf)) {
in = in->next;
continue;
}

cl = ngx_alloc_chain_link(pool);
if (cl == NULL) {
return NGX_ERROR;
Expand Down
184 changes: 96 additions & 88 deletions src/core/ngx_conf_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,14 @@ ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last)
{
char *rv;
void *conf, **confp;
ngx_uint_t i, valid;
ngx_uint_t i, multi;
ngx_str_t *name;
ngx_command_t *cmd;

name = cf->args->elts;

multi = 0;

for (i = 0; ngx_modules[i]; i++) {

/* look up the directive in the appropriate modules */
Expand All @@ -242,132 +244,138 @@ ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last)
continue;
}

while (cmd->name.len) {
for ( /* void */ ; cmd->name.len; cmd++) {

if (name->len == cmd->name.len
&& ngx_strcmp(name->data, cmd->name.data) == 0)
{
/* is the directive's location right ? */
if (name->len != cmd->name.len) {
continue;
}

if (!(cmd->type & cf->cmd_type)) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"directive \"%s\" in %s:%ui "
"is not allowed here",
name->data, cf->conf_file->file.name.data,
cf->conf_file->line);
return NGX_ERROR;
}
if (ngx_strcmp(name->data, cmd->name.data) != 0) {
continue;
}

if (!(cmd->type & NGX_CONF_BLOCK) && last != NGX_OK) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"directive \"%s\" in %s:%ui "
"is not terminated by \";\"",
name->data, cf->conf_file->file.name.data,
cf->conf_file->line);
return NGX_ERROR;
}

if ((cmd->type & NGX_CONF_BLOCK)
&& last != NGX_CONF_BLOCK_START)
{
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"directive \"%s\" in %s:%ui "
"has not the opening \"{\"",
name->data, cf->conf_file->file.name.data,
cf->conf_file->line);
return NGX_ERROR;
/* is the directive's location right ? */

if (!(cmd->type & cf->cmd_type)) {
if (cmd->type & NGX_CONF_MULTI) {
multi = 1;
continue;
}

/* is the directive's argument count right ? */
goto not_allowed;
}

if (!(cmd->type & NGX_CONF_BLOCK) && last != NGX_OK) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"directive \"%s\" in %s:%ui "
"is not terminated by \";\"",
name->data, cf->conf_file->file.name.data,
cf->conf_file->line);
return NGX_ERROR;
}

if ((cmd->type & NGX_CONF_BLOCK) && last != NGX_CONF_BLOCK_START) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"directive \"%s\" in %s:%ui "
"has not the opening \"{\"",
name->data, cf->conf_file->file.name.data,
cf->conf_file->line);
return NGX_ERROR;
}

/* is the directive's argument count right ? */

if (cmd->type & NGX_CONF_ANY) {
valid = 1;
if (!(cmd->type & NGX_CONF_ANY)) {

} else if (cmd->type & NGX_CONF_FLAG) {
if (cmd->type & NGX_CONF_FLAG) {

if (cf->args->nelts == 2) {
valid = 1;
} else {
valid = 0;
if (cf->args->nelts != 2) {
goto invalid;
}

} else if (cmd->type & NGX_CONF_1MORE) {

if (cf->args->nelts > 1) {
valid = 1;
} else {
valid = 0;
if (cf->args->nelts < 2) {
goto invalid;
}

} else if (cmd->type & NGX_CONF_2MORE) {

if (cf->args->nelts > 2) {
valid = 1;
} else {
valid = 0;
if (cf->args->nelts < 3) {
goto invalid;
}

} else if (cf->args->nelts <= NGX_CONF_MAX_ARGS
&& (cmd->type
& argument_number[cf->args->nelts - 1]))
{
valid = 1;
} else if (cf->args->nelts > NGX_CONF_MAX_ARGS) {

} else {
valid = 0;
}
goto invalid;

if (!valid) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"invalid number arguments in "
"directive \"%s\" in %s:%ui",
name->data, cf->conf_file->file.name.data,
cf->conf_file->line);
return NGX_ERROR;
} else if (!(cmd->type & argument_number[cf->args->nelts - 1]))
{
goto invalid;
}
}

/* set up the directive's configuration context */

conf = NULL;

if (cmd->type & NGX_DIRECT_CONF) {
conf = ((void **) cf->ctx)[ngx_modules[i]->index];
/* set up the directive's configuration context */

} else if (cmd->type & NGX_MAIN_CONF) {
conf = &(((void **) cf->ctx)[ngx_modules[i]->index]);
conf = NULL;

} else if (cf->ctx) {
confp = *(void **) ((char *) cf->ctx + cmd->conf);
if (cmd->type & NGX_DIRECT_CONF) {
conf = ((void **) cf->ctx)[ngx_modules[i]->index];

if (confp) {
conf = confp[ngx_modules[i]->ctx_index];
}
}
} else if (cmd->type & NGX_MAIN_CONF) {
conf = &(((void **) cf->ctx)[ngx_modules[i]->index]);

rv = cmd->set(cf, cmd, conf);
} else if (cf->ctx) {
confp = *(void **) ((char *) cf->ctx + cmd->conf);

if (rv == NGX_CONF_OK) {
return NGX_OK;
if (confp) {
conf = confp[ngx_modules[i]->ctx_index];
}
}

if (rv == NGX_CONF_ERROR) {
return NGX_ERROR;
}
rv = cmd->set(cf, cmd, conf);

ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"the \"%s\" directive %s in %s:%ui",
name->data, rv, cf->conf_file->file.name.data,
cf->conf_file->line);
if (rv == NGX_CONF_OK) {
return NGX_OK;
}

if (rv == NGX_CONF_ERROR) {
return NGX_ERROR;
}

cmd++;
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"the \"%s\" directive %s in %s:%ui",
name->data, rv, cf->conf_file->file.name.data,
cf->conf_file->line);

return NGX_ERROR;
}
}

if (multi == 0) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"unknown directive \"%s\" in %s:%ui",
name->data, cf->conf_file->file.name.data,
cf->conf_file->line);

return NGX_ERROR;
}

not_allowed:

ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"directive \"%s\" in %s:%ui "
"is not allowed here",
name->data, cf->conf_file->file.name.data,
cf->conf_file->line);
return NGX_ERROR;

invalid:

ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"unknown directive \"%s\" in %s:%ui",
"invalid number arguments in "
"directive \"%s\" in %s:%ui",
name->data, cf->conf_file->file.name.data,
cf->conf_file->line);

Expand Down
1 change: 1 addition & 0 deletions src/core/ngx_conf_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#define NGX_CONF_ANY 0x00000400
#define NGX_CONF_1MORE 0x00000800
#define NGX_CONF_2MORE 0x00001000
#define NGX_CONF_MULTI 0x00002000

#define NGX_DIRECT_CONF 0x00010000

Expand Down
1 change: 1 addition & 0 deletions src/core/ngx_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define NGX_LOG_DEBUG_EVENT 0x080
#define NGX_LOG_DEBUG_HTTP 0x100
#define NGX_LOG_DEBUG_IMAP 0x200
#define NGX_LOG_DEBUG_MYSQL 0x400

/*
* do not forget to update debug_levels[] in src/core/ngx_log.c
Expand Down
Loading

0 comments on commit ac72bd1

Please sign in to comment.