Mercurial > hg > nginx-vendor-0-6
comparison src/imap/ngx_imap_auth_http_module.c @ 286:5bef04fc3fd5 NGINX_0_5_13
nginx 0.5.13
*) Feature: the COPY and MOVE methods.
*) Bugfix: the ngx_http_realip_module set garbage for requests passed
via keep-alive connection.
*) Bugfix: nginx did not work on big-endian 64-bit Linux.
Thanks to Andrei Nigmatulin.
*) Bugfix: now when IMAP/POP3 proxy receives too long command it closes
the connection right away, but not after timeout.
*) Bugfix: if the "epoll" method was used and a client closed a
connection prematurely, then nginx closed the connection after a
send timeout only.
*) Bugfix: nginx could not be built on platforms different from i386,
amd64, sparc and ppc; bug appeared in 0.5.8.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 19 Feb 2007 00:00:00 +0300 |
parents | 251bcd11a5b8 |
children |
comparison
equal
deleted
inserted
replaced
285:0e505c8b6528 | 286:5bef04fc3fd5 |
---|---|
475 #endif | 475 #endif |
476 | 476 |
477 len = ctx->header_name_end - ctx->header_name_start; | 477 len = ctx->header_name_end - ctx->header_name_start; |
478 | 478 |
479 if (len == sizeof("Auth-Status") - 1 | 479 if (len == sizeof("Auth-Status") - 1 |
480 && ngx_strncasecmp(ctx->header_name_start, "Auth-Status", | 480 && ngx_strncasecmp(ctx->header_name_start, |
481 sizeof("Auth-Status") - 1) == 0) | 481 (u_char *) "Auth-Status", |
482 sizeof("Auth-Status") - 1) | |
483 == 0) | |
482 { | 484 { |
483 len = ctx->header_end - ctx->header_start; | 485 len = ctx->header_end - ctx->header_start; |
484 | 486 |
485 if (len == 2 | 487 if (len == 2 |
486 && ctx->header_start[0] == 'O' | 488 && ctx->header_start[0] == 'O' |
537 | 539 |
538 continue; | 540 continue; |
539 } | 541 } |
540 | 542 |
541 if (len == sizeof("Auth-Server") - 1 | 543 if (len == sizeof("Auth-Server") - 1 |
542 && ngx_strncasecmp(ctx->header_name_start, "Auth-Server", | 544 && ngx_strncasecmp(ctx->header_name_start, |
543 sizeof("Auth-Server") - 1) == 0) | 545 (u_char *) "Auth-Server", |
546 sizeof("Auth-Server") - 1) | |
547 == 0) | |
544 { | 548 { |
545 ctx->addr.len = ctx->header_end - ctx->header_start; | 549 ctx->addr.len = ctx->header_end - ctx->header_start; |
546 ctx->addr.data = ctx->header_start; | 550 ctx->addr.data = ctx->header_start; |
547 | 551 |
548 continue; | 552 continue; |
549 } | 553 } |
550 | 554 |
551 if (len == sizeof("Auth-Port") - 1 | 555 if (len == sizeof("Auth-Port") - 1 |
552 && ngx_strncasecmp(ctx->header_name_start, "Auth-Port", | 556 && ngx_strncasecmp(ctx->header_name_start, |
553 sizeof("Auth-Port") - 1) == 0) | 557 (u_char *) "Auth-Port", |
558 sizeof("Auth-Port") - 1) | |
559 == 0) | |
554 { | 560 { |
555 ctx->port.len = ctx->header_end - ctx->header_start; | 561 ctx->port.len = ctx->header_end - ctx->header_start; |
556 ctx->port.data = ctx->header_start; | 562 ctx->port.data = ctx->header_start; |
557 | 563 |
558 continue; | 564 continue; |
559 } | 565 } |
560 | 566 |
561 if (len == sizeof("Auth-User") - 1 | 567 if (len == sizeof("Auth-User") - 1 |
562 && ngx_strncasecmp(ctx->header_name_start, "Auth-User", | 568 && ngx_strncasecmp(ctx->header_name_start, |
563 sizeof("Auth-User") - 1) == 0) | 569 (u_char *) "Auth-User", |
570 sizeof("Auth-User") - 1) | |
571 == 0) | |
564 { | 572 { |
565 s->login.len = ctx->header_end - ctx->header_start; | 573 s->login.len = ctx->header_end - ctx->header_start; |
566 | 574 |
567 s->login.data = ngx_palloc(s->connection->pool, s->login.len); | 575 s->login.data = ngx_palloc(s->connection->pool, s->login.len); |
568 if (s->login.data == NULL) { | 576 if (s->login.data == NULL) { |
576 | 584 |
577 continue; | 585 continue; |
578 } | 586 } |
579 | 587 |
580 if (len == sizeof("Auth-Pass") - 1 | 588 if (len == sizeof("Auth-Pass") - 1 |
581 && ngx_strncasecmp(ctx->header_name_start, "Auth-Pass", | 589 && ngx_strncasecmp(ctx->header_name_start, |
582 sizeof("Auth-Pass") - 1) == 0) | 590 (u_char *) "Auth-Pass", |
591 sizeof("Auth-Pass") - 1) | |
592 == 0) | |
583 { | 593 { |
584 s->passwd.len = ctx->header_end - ctx->header_start; | 594 s->passwd.len = ctx->header_end - ctx->header_start; |
585 | 595 |
586 s->passwd.data = ngx_palloc(s->connection->pool, s->passwd.len); | 596 s->passwd.data = ngx_palloc(s->connection->pool, s->passwd.len); |
587 if (s->passwd.data == NULL) { | 597 if (s->passwd.data == NULL) { |
595 | 605 |
596 continue; | 606 continue; |
597 } | 607 } |
598 | 608 |
599 if (len == sizeof("Auth-Wait") - 1 | 609 if (len == sizeof("Auth-Wait") - 1 |
600 && ngx_strncasecmp(ctx->header_name_start, "Auth-Wait", | 610 && ngx_strncasecmp(ctx->header_name_start, |
601 sizeof("Auth-Wait") - 1) == 0) | 611 (u_char *) "Auth-Wait", |
612 sizeof("Auth-Wait") - 1) | |
613 == 0) | |
602 { | 614 { |
603 n = ngx_atoi(ctx->header_start, | 615 n = ngx_atoi(ctx->header_start, |
604 ctx->header_end - ctx->header_start); | 616 ctx->header_end - ctx->header_start); |
605 | 617 |
606 if (n != NGX_ERROR) { | 618 if (n != NGX_ERROR) { |