nginx-0.0.3-2004-03-23-09:01:52 import
diff --git a/src/core/ngx_hunk.h b/src/core/ngx_hunk.h
index ab32e45..afeca1e 100644
--- a/src/core/ngx_hunk.h
+++ b/src/core/ngx_hunk.h
@@ -92,7 +92,7 @@
ngx_hunk_tag_t tag;
ngx_output_chain_filter_pt output_filter;
- void *output_ctx;
+ void *filter_ctx;
} ngx_output_chain_ctx_t;
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 55c4a50..285bd83 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -28,13 +28,13 @@
if (ctx->in == NULL) {
if (in == NULL) {
- return ctx->output_filter(ctx->output_ctx, in);
+ return ctx->output_filter(ctx->filter_ctx, in);
}
if (in->next == NULL
&& (!ngx_output_chain_need_to_copy(ctx, in->hunk)))
{
- return ctx->output_filter(ctx->output_ctx, in);
+ return ctx->output_filter(ctx->filter_ctx, in);
}
}
@@ -153,7 +153,7 @@
return last;
}
- last = ctx->output_filter(ctx->output_ctx, out);
+ last = ctx->output_filter(ctx->filter_ctx, out);
ngx_chain_update_chains(&ctx->free, &ctx->busy, &out, ctx->tag);
last_out = &out;
diff --git a/src/core/ngx_regex.c b/src/core/ngx_regex.c
index 1627f9f..617fddc 100644
--- a/src/core/ngx_regex.c
+++ b/src/core/ngx_regex.c
@@ -42,6 +42,10 @@
}
}
+ /* ensure that there is no current pool */
+
+ ngx_pcre_pool = NULL;
+
return re;
}
@@ -64,7 +68,11 @@
static void *ngx_regex_malloc(size_t size)
{
- return ngx_palloc(ngx_pcre_pool, size);
+ if (ngx_pcre_pool) {
+ return ngx_palloc(ngx_pcre_pool, size);
+ }
+
+ return NULL;
}
diff --git a/src/event/ngx_event_pipe.c b/src/event/ngx_event_pipe.c
index b7cb6b6..f254517 100644
--- a/src/event/ngx_event_pipe.c
+++ b/src/event/ngx_event_pipe.c
@@ -377,12 +377,16 @@
bsize = 0;
to_write = 0;
+#if 0
if (!(p->upstream_eof || p->upstream_error || p->upstream_done)) {
+#endif
for (cl = p->busy; cl; cl = cl->next) {
bsize += cl->hunk->end - cl->hunk->start;
to_write += ngx_hunk_size(cl->hunk);
}
+#if 0
}
+#endif
out = NULL;
ll = NULL;
@@ -391,11 +395,17 @@
if (p->out) {
cl = p->out;
+#if 0
if (!(p->upstream_eof || p->upstream_error || p->upstream_done)
&& (bsize + ngx_hunk_size(cl->hunk) > p->busy_size))
{
break;
}
+#else
+ if (bsize + ngx_hunk_size(cl->hunk) > p->busy_size) {
+ break;
+ }
+#endif
p->out = p->out->next;
ngx_event_pipe_free_shadow_raw_hunk(&p->free_raw_hunks,
@@ -404,11 +414,17 @@
} else if (!p->cachable && p->in) {
cl = p->in;
+#if 0
if (!(p->upstream_eof || p->upstream_error || p->upstream_done)
&& (bsize + ngx_hunk_size(cl->hunk) > p->busy_size))
{
break;
}
+#else
+ if (bsize + ngx_hunk_size(cl->hunk) > p->busy_size) {
+ break;
+ }
+#endif
p->in = p->in->next;
diff --git a/src/http/modules/ngx_http_gzip_filter.c b/src/http/modules/ngx_http_gzip_filter.c
index a1cbfb0..a1640bd 100644
--- a/src/http/modules/ngx_http_gzip_filter.c
+++ b/src/http/modules/ngx_http_gzip_filter.c
@@ -32,7 +32,7 @@
void *preallocated;
char *free_mem;
- int allocated;
+ ngx_uint_t allocated;
unsigned flush:4;
unsigned redo:1;
@@ -515,8 +515,8 @@
{
ngx_http_gzip_ctx_t *ctx = opaque;
- int alloc;
- void *p;
+ void *p;
+ ngx_uint_t alloc;
alloc = items * size;
if (alloc % 512 != 0) {
@@ -533,7 +533,7 @@
ctx->allocated -= alloc;
ngx_log_debug4(NGX_LOG_DEBUG_HTTP, ctx->request->connection->log, 0,
- "gzip alloc: n:%d s:%d a:%d p:%08X",
+ "gzip alloc: n:%d s:%d a:%d p:" PTR_FMT,
items, size, alloc, p);
return p;
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c
index 0576255..ae1b817 100644
--- a/src/http/modules/ngx_http_static_handler.c
+++ b/src/http/modules/ngx_http_static_handler.c
@@ -89,7 +89,7 @@
rc = ngx_http_discard_body(r);
- if (rc != NGX_OK) {
+ if (rc != NGX_OK && rc != NGX_AGAIN) {
return rc;
}
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.h b/src/http/modules/proxy/ngx_http_proxy_handler.h
index ee95f1b..210ca89 100644
--- a/src/http/modules/proxy/ngx_http_proxy_handler.h
+++ b/src/http/modules/proxy/ngx_http_proxy_handler.h
@@ -108,7 +108,7 @@
typedef struct {
- ngx_table_t *headers; /* it must be first field */
+ ngx_table_t headers; /* it must be first field */
ngx_table_elt_t *date;
ngx_table_elt_t *server;
diff --git a/src/http/modules/proxy/ngx_http_proxy_header.c b/src/http/modules/proxy/ngx_http_proxy_header.c
index 66a6bfe..8c24a06 100644
--- a/src/http/modules/proxy/ngx_http_proxy_header.c
+++ b/src/http/modules/proxy/ngx_http_proxy_header.c
@@ -17,8 +17,8 @@
r = p->request;
- h = headers_in->headers->elts;
- for (i = 0; i < headers_in->headers->nelts; i++) {
+ h = headers_in->headers.elts;
+ for (i = 0; i < headers_in->headers.nelts; i++) {
if (&h[i] == headers_in->connection) {
continue;
@@ -98,37 +98,43 @@
ngx_table_elt_t *loc)
{
u_char *last;
+ ngx_table_elt_t *location;
ngx_http_request_t *r;
ngx_http_proxy_upstream_conf_t *uc;
r = p->request;
uc = p->lcf->upstream;
- r->headers_out.location = ngx_http_add_header(&r->headers_out,
- ngx_http_headers_out);
- if (r->headers_out.location == NULL) {
+ location = ngx_http_add_header(&r->headers_out, ngx_http_headers_out);
+ if (location == NULL) {
return NGX_ERROR;
}
+ /*
+ * we do not set r->headers_out.location to avoid the handling
+ * the local redirects without a host name by ngx_http_header_filter()
+ */
+
+#if 0
+ r->headers_out.location = location;
+#endif
+
if (uc->url.len > loc->value.len
|| ngx_rstrncmp(loc->value.data, uc->url.data, uc->url.len) != 0)
{
- *r->headers_out.location = *loc;
+ *location = *loc;
return NGX_OK;
}
/* TODO: proxy_reverse */
- r->headers_out.location->value.len = uc->location->len
- + (loc->value.len - uc->url.len) + 1;
- r->headers_out.location->value.data =
- ngx_palloc(r->pool, r->headers_out.location->value.len);
-
- if (r->headers_out.location->value.data == NULL) {
+ location->value.len = uc->location->len
+ + (loc->value.len - uc->url.len) + 1;
+ if (!(location->value.data = ngx_palloc(r->pool, location->value.len))) {
return NGX_ERROR;
}
- last = ngx_cpymem(r->headers_out.location->value.data,
+ last = ngx_cpymem(location->value.data,
uc->location->data, uc->location->len);
ngx_cpystrn(last, loc->value.data + uc->url.len,
diff --git a/src/http/modules/proxy/ngx_http_proxy_upstream.c b/src/http/modules/proxy/ngx_http_proxy_upstream.c
index d72f09e..68c9574 100644
--- a/src/http/modules/proxy/ngx_http_proxy_upstream.c
+++ b/src/http/modules/proxy/ngx_http_proxy_upstream.c
@@ -148,8 +148,8 @@
}
- header = (ngx_table_elt_t *) r->headers_in.headers->elts;
- for (i = 0; i < r->headers_in.headers->nelts; i++) {
+ header = r->headers_in.headers.elts;
+ for (i = 0; i < r->headers_in.headers.nelts; i++) {
if (&header[i] == r->headers_in.host) {
continue;
@@ -198,7 +198,7 @@
h->last = ngx_cpymem(h->last, host_header, sizeof(host_header) - 1);
- if (p->lcf->preserve_host) {
+ if (p->lcf->preserve_host && r->headers_in.host) {
h->last = ngx_cpymem(h->last, r->headers_in.host->value.data,
r->headers_in.host_name_len);
@@ -250,7 +250,7 @@
}
- for (i = 0; i < r->headers_in.headers->nelts; i++) {
+ for (i = 0; i < r->headers_in.headers.nelts; i++) {
if (&header[i] == r->headers_in.host) {
continue;
@@ -377,7 +377,7 @@
return;
}
- output->output_ctx = writer;
+ output->filter_ctx = writer;
writer->pool = r->pool;
if (p->lcf->busy_lock && !p->busy_locked) {
@@ -392,7 +392,6 @@
{
ngx_chain_t *cl;
ngx_output_chain_ctx_t *output;
- ngx_chain_writer_ctx_t *writer;
output = p->upstream->output_chain_ctx;
@@ -400,6 +399,7 @@
for (cl = p->request->request_hunks; cl; cl = cl->next) {
cl->hunk->pos = cl->hunk->start;
+ cl->hunk->file_pos = 0;
}
/* reinit the ngx_output_chain() context */
@@ -521,7 +521,7 @@
/* init or reinit the ngx_output_chain() and ngx_chain_writer() contexts */
output = p->upstream->output_chain_ctx;
- writer = output->output_ctx;
+ writer = output->filter_ctx;
writer->out = NULL;
writer->last = &writer->out;
writer->connection = c;
@@ -541,7 +541,6 @@
output->hunks = 1;
r->request_body_hunk->pos = r->request_body_hunk->start;
- r->request_body_hunk->last = r->request_body_hunk->start;
}
p->request_sent = 0;
@@ -824,14 +823,26 @@
"http proxy status %d \"%s\"",
p->upstream->status, p->upstream->status_line.data);
- if (p->upstream->headers_in.headers) {
- p->upstream->headers_in.headers->nelts = 0;
+
+ /* init or reinit the p->upstream->headers_in.headers table */
+
+ if (p->upstream->headers_in.headers.elts) {
+ p->upstream->headers_in.headers.nelts = 0;
+
} else {
- /* TODO: ngx_init_table */
- p->upstream->headers_in.headers = ngx_create_table(p->request->pool,
- 20);
+ p->upstream->headers_in.headers.elts = ngx_pcalloc(p->request->pool,
+ 20 * sizeof(ngx_table_elt_t));
+ if (p->upstream->headers_in.headers.elts == NULL) {
+ ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return;
+ }
+ /* p->upstream->headers_in.headers.nelts = 0; */
+ p->upstream->headers_in.headers.nalloc = 20;
+ p->upstream->headers_in.headers.size = sizeof(ngx_table_elt_t);
+ p->upstream->headers_in.headers.pool = p->request->pool;
}
+
c->read->event_handler = ngx_http_proxy_process_upstream_headers;
ngx_http_proxy_process_upstream_headers(rev);
}
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index e3c8598..f3f47f8 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -537,6 +537,25 @@
r->connection->tcp_nopush = -1;
}
+
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http cl: " SIZE_T_FMT " max: " SIZE_T_FMT,
+ r->headers_in.content_length_n,
+ clcf->client_max_body_size);
+
+ if (r->headers_in.content_length_n != -1
+ && clcf->client_max_body_size
+ && clcf->client_max_body_size < (size_t) r->headers_in.content_length_n)
+ {
+ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+ "client intented to send too large body: "
+ SIZE_T_FMT " bytes",
+ r->headers_in.content_length_n);
+
+ return NGX_HTTP_REQUEST_ENTITY_TOO_LARGE;
+ }
+
+
if (auto_redirect) {
if (!(r->headers_out.location =
ngx_http_add_header(&r->headers_out, ngx_http_headers_out)))
diff --git a/src/http/ngx_http_header_filter.c b/src/http/ngx_http_header_filter.c
index d399daa..e3bc734 100644
--- a/src/http/ngx_http_header_filter.c
+++ b/src/http/ngx_http_header_filter.c
@@ -205,8 +205,8 @@
len += sizeof("Connection: closed" CRLF) - 1;
}
- header = r->headers_out.headers->elts;
- for (i = 0; i < r->headers_out.headers->nelts; i++) {
+ header = r->headers_out.headers.elts;
+ for (i = 0; i < r->headers_out.headers.nelts; i++) {
if (header[i].key.len == 0) {
continue;
}
@@ -321,7 +321,7 @@
sizeof("Connection: close" CRLF) - 1);
}
- for (i = 0; i < r->headers_out.headers->nelts; i++) {
+ for (i = 0; i < r->headers_out.headers.nelts; i++) {
if (header[i].key.len == 0) {
continue;
}
diff --git a/src/http/ngx_http_headers.c b/src/http/ngx_http_headers.c
index 900323a..57413af 100644
--- a/src/http/ngx_http_headers.c
+++ b/src/http/ngx_http_headers.c
@@ -60,12 +60,12 @@
ngx_table_elt_t *ngx_http_add_header(void *header,
ngx_http_header_t *http_headers)
{
- char *prev;
+ void *prev;
ngx_uint_t i, j;
ngx_table_t *headers;
ngx_table_elt_t *h, *new;
- headers = *(ngx_table_t **) header;
+ headers = header;
prev = headers->elts;
diff --git a/src/http/ngx_http_log_handler.c b/src/http/ngx_http_log_handler.c
index 3edb55b..908d6fc 100644
--- a/src/http/ngx_http_log_handler.c
+++ b/src/http/ngx_http_log_handler.c
@@ -327,8 +327,8 @@
s = (ngx_str_t *) data;
- h = r->headers_in.headers->elts;
- for (i = 0; i < r->headers_in.headers->nelts; i++) {
+ h = r->headers_in.headers.elts;
+ for (i = 0; i < r->headers_in.headers.nelts; i++) {
if (h[i].key.len != s->len) {
continue;
}
@@ -535,8 +535,8 @@
s = (ngx_str_t *) data;
- h = r->headers_out.headers->elts;
- for (i = 0; i < r->headers_out.headers->nelts; i++) {
+ h = r->headers_out.headers.elts;
+ for (i = 0; i < r->headers_out.headers.nelts; i++) {
if (h[i].key.len != s->len) {
continue;
}
diff --git a/src/http/ngx_http_output_filter.c b/src/http/ngx_http_output_filter.c
index f6cc85d..9b87174 100644
--- a/src/http/ngx_http_output_filter.c
+++ b/src/http/ngx_http_output_filter.c
@@ -77,7 +77,7 @@
ctx->output_filter = (ngx_output_chain_filter_pt)
ngx_http_top_body_filter;
- ctx->output_ctx = r;
+ ctx->filter_ctx = r;
}
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 1e65a47..6562c8d 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -38,8 +38,7 @@
"client %s sent invalid header, URL: %s",
"client %s sent too long header line, URL: %s",
"client %s sent HTTP/1.1 request without \"Host\" header, URL: %s",
- "client %s sent invalid \"Content-Length\" header, URL: %s",
- "client %s wanted to send too large body: " SIZE_T_FMT " bytes, URL: %s"
+ "client %s sent invalid \"Content-Length\" header, URL: %s"
};
@@ -248,12 +247,21 @@
r->cleanup.size = sizeof(ngx_http_cleanup_t);
r->cleanup.pool = r->pool;
- /* TODO: ngx_init_table */
- if (!(r->headers_out.headers = ngx_create_table(r->pool, 20))) {
+
+ /* init the r->headers_out.headers table */
+
+ r->headers_out.headers.elts = ngx_pcalloc(r->pool,
+ 20 * sizeof(ngx_table_elt_t));
+ if (r->headers_out.headers.elts == NULL) {
ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
ngx_http_close_connection(c);
return;
}
+ /* r->headers_out.headers.nelts = 0; */
+ r->headers_out.headers.nalloc = 20;
+ r->headers_out.headers.size = sizeof(ngx_table_elt_t);
+ r->headers_out.headers.pool = r->pool;
+
r->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module);
if (r->ctx == NULL) {
@@ -469,11 +477,26 @@
return;
}
+
+ /* init the r->headers_in.headers table */
+
+ r->headers_in.headers.elts = ngx_pcalloc(r->pool,
+ 20 * sizeof(ngx_table_elt_t));
+ if (r->headers_in.headers.elts == NULL) {
+ ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ /* r->headers_in.headers.elts = NULL; */
+ /* r->headers_in.headers.nelts = 0; */
+ r->headers_in.headers.size = sizeof(ngx_table_elt_t);
+ r->headers_in.headers.nalloc = 20;
+ r->headers_in.headers.pool = r->pool;
+
ctx = c->log->data;
ctx->action = "reading client request headers";
ctx->url = r->unparsed_uri.data;
- /* TODO: ngx_init_table */
- r->headers_in.headers = ngx_create_table(r->pool, 20);
if (cscf->large_client_header
&& r->header_in->pos == r->header_in->last)
@@ -848,21 +871,6 @@
if (r->headers_in.content_length_n == NGX_ERROR) {
return NGX_HTTP_PARSE_INVALID_CL_HEADER;
}
-
- clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "http cl: " SIZE_T_FMT " max: " SIZE_T_FMT,
- r->headers_in.content_length_n,
- clcf->client_max_body_size);
-
- if (clcf->client_max_body_size
- && clcf->client_max_body_size
- < (size_t) r->headers_in.content_length_n)
- {
- return NGX_HTTP_PARSE_ENTITY_TOO_LARGE;
- }
-
}
if (r->headers_in.connection) {
@@ -913,6 +921,12 @@
ngx_del_timer(r->connection->write);
}
+ if (rc == NGX_HTTP_CLIENT_CLOSED_REQUEST || r->closed) {
+ ngx_http_close_request(r, 0);
+ ngx_http_close_connection(r->connection);
+ return;
+ }
+
ngx_http_finalize_request(r, ngx_http_special_response_handler(r, rc));
return;
@@ -1098,8 +1112,6 @@
}
return ngx_http_read_discarded_body(r);
-
- return NGX_OK;
}
@@ -1158,7 +1170,15 @@
n = ngx_recv(r->connection, r->discarded_buffer, size);
if (n == NGX_ERROR) {
- return NGX_HTTP_BAD_REQUEST;
+
+ r->closed = 1;
+
+ /*
+ * when a client request body is discarded then we already set
+ * some HTTP response code for client and we can ignore the error
+ */
+
+ return NGX_OK;
}
if (n == NGX_AGAIN) {
@@ -1606,19 +1626,9 @@
r->connection->log->handler = NULL;
if (ctx->url) {
- if (client_error == NGX_HTTP_PARSE_ENTITY_TOO_LARGE) {
- ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
- client_header_errors[client_error - NGX_HTTP_CLIENT_ERROR],
- ctx->client, r->headers_in.content_length_n, ctx->url);
-
- error = NGX_HTTP_REQUEST_ENTITY_TOO_LARGE;
- r->lingering_close = 1;
-
- } else {
- ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
client_header_errors[client_error - NGX_HTTP_CLIENT_ERROR],
ctx->client, ctx->url);
- }
} else {
if (error == NGX_HTTP_REQUEST_URI_TOO_LARGE) {
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h
index 89cabdb..ad1afd9 100644
--- a/src/http/ngx_http_request.h
+++ b/src/http/ngx_http_request.h
@@ -30,7 +30,6 @@
#define NGX_HTTP_PARSE_TOO_LONG_HEADER 15
#define NGX_HTTP_PARSE_NO_HOST_HEADER 16
#define NGX_HTTP_PARSE_INVALID_CL_HEADER 17
-#define NGX_HTTP_PARSE_ENTITY_TOO_LARGE 18
#define NGX_HTTP_OK 200
@@ -87,7 +86,7 @@
typedef struct {
- ngx_table_t *headers; /* it must be first field */
+ ngx_table_t headers; /* it must be first field */
ngx_table_elt_t *host;
ngx_table_elt_t *connection;
@@ -137,7 +136,7 @@
typedef struct {
- ngx_table_t *headers; /* it must be first field */
+ ngx_table_t headers; /* it must be first field */
int status;
ngx_str_t status_line;
@@ -265,9 +264,7 @@
unsigned header_only:1;
unsigned keepalive:1;
unsigned lingering_close:1;
-#if 0
unsigned closed:1;
-#endif
/* TODO: use the filter flags or the separate bits ???? */
u_int filter;
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
index 2bc63f7..99ac8aa 100644
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -12,7 +12,6 @@
ngx_int_t ngx_http_read_client_request_body(ngx_http_request_t *r,
size_t request_buffer_size)
{
- ngx_int_t rc;
ssize_t size;
ngx_hunk_t *h;
ngx_chain_t *cl;
@@ -143,12 +142,17 @@
}
if (n == 0 || n == NGX_ERROR) {
+ r->closed = 1;
return NGX_HTTP_BAD_REQUEST;
}
r->request_body_hunk->last += n;
r->request_body_len -= n;
+ if (r->request_body_len == 0) {
+ break;
+ }
+
if (r->request_body_hunk->last < r->request_body_hunk->end) {
break;
}
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 5ffebb4..275ae95 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -185,8 +185,8 @@
rc = ngx_http_discard_body(r);
- if (rc != NGX_OK) {
- return rc;
+ if (rc == NGX_HTTP_INTERNAL_SERVER_ERROR) {
+ error = NGX_HTTP_INTERNAL_SERVER_ERROR;
}
r->headers_out.status = error;
diff --git a/src/os/win32/ngx_socket.h b/src/os/win32/ngx_socket.h
index ec519c3..4401c3d 100644
--- a/src/os/win32/ngx_socket.h
+++ b/src/os/win32/ngx_socket.h
@@ -96,7 +96,7 @@
extern LPFN_TRANSMITFILE transmitfile;
-static ngx_inline int ngx_tcp_push(ngx_socket_t s) {
+ngx_inline static int ngx_tcp_push(ngx_socket_t s) {
return 0;
}
diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h
index b6388f5..a600952 100644
--- a/src/os/win32/ngx_win32_config.h
+++ b/src/os/win32/ngx_win32_config.h
@@ -50,7 +50,7 @@
#include <ngx_auto_config.h>
-#define ngx_inlie __inline
+#define ngx_inline __inline
#ifdef _MSC_VER