comparison src/core/ngx_conf_file.c @ 32:da8c190bdaba NGINX_0_1_16

nginx 0.1.16 *) Bugfix: if the response were transferred by chunks, then on the HEAD request the final chunk was issued. *) Bugfix: the "Connection: keep-alive" header were issued, even if the keepalive_timeout directive forbade the keep-alive use. *) Bugfix: the errors in the ngx_http_fastcgi_module caused the segmentation faults. *) Bugfix: the compressed response encrypted by SSL may not transferred complete. *) Bugfix: the TCP-specific TCP_NODELAY, TCP_NOPSUH, and TCP_CORK options, are not used for the unix domain sockets. *) Feature: the rewrite directive supports the arguments rewriting. *) Bugfix: the response code 400 was returned for the POST request with the "Content-Length: 0" header; bug appeared in 0.1.14.
author Igor Sysoev <http://sysoev.ru>
date Tue, 25 Jan 2005 00:00:00 +0300
parents 46833bd150cb
children aab2ea7c0458
comparison
equal deleted inserted replaced
31:1b17dd824438 32:da8c190bdaba
109 * NGX_CONF_BLOCK_START the token terminated by "{" was found 109 * NGX_CONF_BLOCK_START the token terminated by "{" was found
110 * NGX_CONF_BLOCK_DONE the "}" was found 110 * NGX_CONF_BLOCK_DONE the "}" was found
111 * NGX_CONF_FILE_DONE the configuration file is done 111 * NGX_CONF_FILE_DONE the configuration file is done
112 */ 112 */
113 113
114 #if 0
115 ngx_log_debug(cf->log, "token %d" _ rc);
116 #endif
117
118 if (rc == NGX_ERROR) { 114 if (rc == NGX_ERROR) {
119 break; 115 break;
120 } 116 }
121 117
122 if (rc != NGX_OK && rc != NGX_CONF_BLOCK_START) { 118 if (rc != NGX_OK && rc != NGX_CONF_BLOCK_START) {
171 if (name->len == cmd->name.len 167 if (name->len == cmd->name.len
172 && ngx_strcmp(name->data, cmd->name.data) == 0) 168 && ngx_strcmp(name->data, cmd->name.data) == 0)
173 { 169 {
174 170
175 found = 1; 171 found = 1;
176 #if 0 172
177 ngx_log_debug(cf->log, "command '%s'" _ cmd->name.data);
178 #endif
179 /* is the directive's location right ? */ 173 /* is the directive's location right ? */
180 174
181 if ((cmd->type & cf->cmd_type) == 0) { 175 if ((cmd->type & cf->cmd_type) == 0) {
182 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, 176 ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
183 "directive \"%s\" in %s:%d " 177 "directive \"%s\" in %s:%d "
282 } 276 }
283 } 277 }
284 278
285 rv = cmd->set(cf, cmd, conf); 279 rv = cmd->set(cf, cmd, conf);
286 280
287 #if 0
288 ngx_log_debug(cf->log, "rv: %d" _ rv);
289 #endif
290
291 if (rv == NGX_CONF_OK) { 281 if (rv == NGX_CONF_OK) {
292 break; 282 break;
293 283
294 } else if (rv == NGX_CONF_ERROR) { 284 } else if (rv == NGX_CONF_ERROR) {
295 rc = NGX_ERROR; 285 rc = NGX_ERROR;
364 354
365 cf->args->nelts = 0; 355 cf->args->nelts = 0;
366 b = cf->conf_file->buffer; 356 b = cf->conf_file->buffer;
367 start = b->pos; 357 start = b->pos;
368 358
369 #if 0
370 ngx_log_debug(cf->log, "TOKEN START");
371 #endif
372
373 for ( ;; ) { 359 for ( ;; ) {
374 360
375 if (b->pos >= b->last) { 361 if (b->pos >= b->last) {
376 if (cf->conf_file->file.offset 362 if (cf->conf_file->file.offset
377 >= ngx_file_size(&cf->conf_file->file.info)) { 363 >= ngx_file_size(&cf->conf_file->file.info)) {
395 start = b->start; 381 start = b->start;
396 b->last = b->pos + n; 382 b->last = b->pos + n;
397 } 383 }
398 384
399 ch = *b->pos++; 385 ch = *b->pos++;
400
401 #if 0
402 ngx_log_debug(cf->log, "%d:%d:%d:%d:%d '%c'" _
403 last_space _ need_space _
404 quoted _ s_quoted _ d_quoted _ ch);
405 #endif
406 386
407 if (ch == LF) { 387 if (ch == LF) {
408 cf->conf_file->line++; 388 cf->conf_file->line++;
409 389
410 if (sharp_comment) { 390 if (sharp_comment) {
572 *dst++ = *src++; 552 *dst++ = *src++;
573 } 553 }
574 *dst = '\0'; 554 *dst = '\0';
575 word->len = len; 555 word->len = len;
576 556
577 #if 0
578 ngx_log_debug(cf->log, "FOUND %d:'%s'" _ word->len _ word->data);
579 #endif
580
581 if (ch == ';') { 557 if (ch == ';') {
582 return NGX_OK; 558 return NGX_OK;
583 } 559 }
584 560
585 if (ch == '{') { 561 if (ch == '{') {