]> git.kaiwu.me - nginx.git/commitdiff
use correct auth method length
authorIgor Sysoev <igor@sysoev.ru>
Fri, 17 Nov 2006 09:30:46 +0000 (09:30 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 17 Nov 2006 09:30:46 +0000 (09:30 +0000)
src/imap/ngx_imap_auth_http_module.c

index 867707f908a6cd2a3ba52f6f2b9c40867bb852fb..beca1950d3efd2703fe10cdbd35a978ccfdffd42 100644 (file)
@@ -1039,7 +1039,9 @@ ngx_imap_auth_http_create_request(ngx_imap_session_t *s, ngx_pool_t *pool,
 
     len = sizeof("GET ") - 1 + ahcf->uri.len + sizeof(" HTTP/1.0" CRLF) - 1
           + sizeof("Host: ") - 1 + ahcf->host_header.len + sizeof(CRLF) - 1
-          + sizeof("Auth-Method: plain" CRLF) - 1
+          + sizeof("Auth-Method: ") - 1
+                + ngx_imap_auth_http_method[s->auth_method].len
+                + sizeof(CRLF) - 1
           + sizeof("Auth-User: ") - 1 + login.len + sizeof(CRLF) - 1
           + sizeof("Auth-Pass: ") - 1 + passwd.len + sizeof(CRLF) - 1
           + sizeof("Auth-Salt: ") - 1 + s->salt.len