Mercurial > hg > nginx-vendor-0-5
comparison src/core/ngx_conf_file.c @ 36:a39d1b793287 NGINX_0_1_18
nginx 0.1.18
*) Workaround: the default values of the devpoll_events and the
devpoll_changes directives changed from 512 to 32 to be compatible
with Solaris 10.
*) Bugfix: the proxy_set_x_var and fastcgi_set_var directives were not
inherited.
*) Bugfix: in the redirect rewrite directive the arguments were
concatenated with URI by the "&" rather than the "?".
*) Bugfix: the lines without trailing ";" in the file being included by
the ngx_http_geo_module were silently ignored.
*) Feature: the ngx_http_stub_status_module.
*) Bugfix: the unknown log format in the access_log directive caused
the segmentation fault.
*) Feature: the new "document_root" parameter of the fastcgi_params
directive.
*) Feature: the fastcgi_redirect_errors directive.
*) Feature: the new "break" modifier of the "rewrite" directive allows
to stop the rewrite/location cycle and sets the current
configuration to the request.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 09 Feb 2005 00:00:00 +0300 |
parents | aab2ea7c0458 |
children | 6cfc63e68377 |
comparison
equal
deleted
inserted
replaced
35:ef53675fe4a6 | 36:a39d1b793287 |
---|---|
46 NGX_CONF_TAKE5, | 46 NGX_CONF_TAKE5, |
47 NGX_CONF_TAKE6, | 47 NGX_CONF_TAKE6, |
48 NGX_CONF_TAKE7 | 48 NGX_CONF_TAKE7 |
49 }; | 49 }; |
50 | 50 |
51 static int ngx_conf_read_token(ngx_conf_t *cf); | 51 static ngx_int_t ngx_conf_read_token(ngx_conf_t *cf); |
52 | 52 |
53 | 53 |
54 char *ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename) | 54 char *ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename) |
55 { | 55 { |
56 int m, rc, found, valid; | 56 int m, rc, found, valid; |
335 | 335 |
336 return NGX_CONF_OK; | 336 return NGX_CONF_OK; |
337 } | 337 } |
338 | 338 |
339 | 339 |
340 static int ngx_conf_read_token(ngx_conf_t *cf) | 340 static ngx_int_t ngx_conf_read_token(ngx_conf_t *cf) |
341 { | 341 { |
342 u_char *start, ch, *src, *dst; | 342 u_char *start, ch, *src, *dst; |
343 int len; | 343 int len; |
344 int found, need_space, last_space, sharp_comment; | 344 int found, need_space, last_space, sharp_comment; |
345 int quoted, s_quoted, d_quoted; | 345 int quoted, s_quoted, d_quoted; |
359 | 359 |
360 for ( ;; ) { | 360 for ( ;; ) { |
361 | 361 |
362 if (b->pos >= b->last) { | 362 if (b->pos >= b->last) { |
363 if (cf->conf_file->file.offset | 363 if (cf->conf_file->file.offset |
364 >= ngx_file_size(&cf->conf_file->file.info)) { | 364 >= ngx_file_size(&cf->conf_file->file.info)) |
365 { | |
366 if (cf->args->nelts > 0) { | |
367 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | |
368 "unexpected end of file in %s:%d, " | |
369 "expecting \";\" or \"}\"", | |
370 cf->conf_file->file.name.data, | |
371 cf->conf_file->line); | |
372 return NGX_ERROR; | |
373 } | |
374 | |
365 return NGX_CONF_FILE_DONE; | 375 return NGX_CONF_FILE_DONE; |
366 } | 376 } |
367 | 377 |
368 if (b->pos - start) { | 378 if (b->pos - start) { |
369 ngx_memcpy(b->start, start, b->pos - start); | 379 ngx_memcpy(b->start, start, b->pos - start); |
416 if (ch == '{') { | 426 if (ch == '{') { |
417 return NGX_CONF_BLOCK_START; | 427 return NGX_CONF_BLOCK_START; |
418 } | 428 } |
419 | 429 |
420 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | 430 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, |
421 "unexpected '%c' in %s:%d", | 431 "unexpected \"%c\" in %s:%d", |
422 ch, cf->conf_file->file.name.data, | 432 ch, cf->conf_file->file.name.data, |
423 cf->conf_file->line); | 433 cf->conf_file->line); |
424 | 434 |
425 return NGX_ERROR; | 435 return NGX_ERROR; |
426 } | 436 } |
436 | 446 |
437 case ';': | 447 case ';': |
438 case '{': | 448 case '{': |
439 if (cf->args->nelts == 0) { | 449 if (cf->args->nelts == 0) { |
440 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | 450 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, |
441 "unexpected '%c' in %s:%d", | 451 "unexpected \"%c\" in %s:%d", |
442 ch, cf->conf_file->file.name.data, | 452 ch, cf->conf_file->file.name.data, |
443 cf->conf_file->line); | 453 cf->conf_file->line); |
444 return NGX_ERROR; | 454 return NGX_ERROR; |
445 } | 455 } |
446 | 456 |
451 return NGX_OK; | 461 return NGX_OK; |
452 | 462 |
453 case '}': | 463 case '}': |
454 if (cf->args->nelts > 0) { | 464 if (cf->args->nelts > 0) { |
455 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | 465 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, |
456 "unexpected '}' in %s:%d", | 466 "unexpected \"}\" in %s:%d", |
457 cf->conf_file->file.name.data, | 467 cf->conf_file->file.name.data, |
458 cf->conf_file->line); | 468 cf->conf_file->line); |
459 return NGX_ERROR; | 469 return NGX_ERROR; |
460 } | 470 } |
461 | 471 |