comparison src/mail/ngx_mail_imap_handler.c @ 382:984bb0b1399b NGINX_0_7_3

nginx 0.7.3 *) Change: the "rss" extension MIME type has been changed to "application/rss+xml". *) Change: now the "gzip_vary" directive turned on issues a "Vary: Accept-Encoding" header line for uncompressed responses too. *) Feature: now the "rewrite" directive does a redirect automatically if the "https://" protocol is used. *) Bugfix: the "proxy_pass" directive did not work with the HTTPS protocol; the bug had appeared in 0.6.9.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Jun 2008 00:00:00 +0400
parents b743d290eb3b
children dac47e9ef0d5
comparison
equal deleted inserted replaced
381:23d1555141d9 382:984bb0b1399b
257 s->tag.data = (u_char *) imap_star; 257 s->tag.data = (u_char *) imap_star;
258 } 258 }
259 259
260 if (s->tagged_line.len < s->tag.len + s->text.len + s->out.len) { 260 if (s->tagged_line.len < s->tag.len + s->text.len + s->out.len) {
261 s->tagged_line.len = s->tag.len + s->text.len + s->out.len; 261 s->tagged_line.len = s->tag.len + s->text.len + s->out.len;
262 s->tagged_line.data = ngx_palloc(c->pool, s->tagged_line.len); 262 s->tagged_line.data = ngx_pnalloc(c->pool, s->tagged_line.len);
263 if (s->tagged_line.data == NULL) { 263 if (s->tagged_line.data == NULL) {
264 ngx_mail_close_connection(c); 264 ngx_mail_close_connection(c);
265 return; 265 return;
266 } 266 }
267 } 267 }
315 if (s->args.nelts != 2 || arg[0].len == 0) { 315 if (s->args.nelts != 2 || arg[0].len == 0) {
316 return NGX_MAIL_PARSE_INVALID_COMMAND; 316 return NGX_MAIL_PARSE_INVALID_COMMAND;
317 } 317 }
318 318
319 s->login.len = arg[0].len; 319 s->login.len = arg[0].len;
320 s->login.data = ngx_palloc(c->pool, s->login.len); 320 s->login.data = ngx_pnalloc(c->pool, s->login.len);
321 if (s->login.data == NULL) { 321 if (s->login.data == NULL) {
322 return NGX_ERROR; 322 return NGX_ERROR;
323 } 323 }
324 324
325 ngx_memcpy(s->login.data, arg[0].data, s->login.len); 325 ngx_memcpy(s->login.data, arg[0].data, s->login.len);
326 326
327 s->passwd.len = arg[1].len; 327 s->passwd.len = arg[1].len;
328 s->passwd.data = ngx_palloc(c->pool, s->passwd.len); 328 s->passwd.data = ngx_pnalloc(c->pool, s->passwd.len);
329 if (s->passwd.data == NULL) { 329 if (s->passwd.data == NULL) {
330 return NGX_ERROR; 330 return NGX_ERROR;
331 } 331 }
332 332
333 ngx_memcpy(s->passwd.data, arg[1].data, s->passwd.len); 333 ngx_memcpy(s->passwd.data, arg[1].data, s->passwd.len);