comparison src/http/modules/ngx_http_proxy_module.c @ 88:e916a291e9aa NGINX_0_1_44

nginx 0.1.44 *) Feature: the IMAP/POP3 proxy supports SSL. *) Feature: the "proxy_timeout" directive of the ngx_imap_proxy_module. *) Feature: the "userid_mark" directive. *) Feature: the $remote_user variable value is determined independently of authorization use.
author Igor Sysoev <http://sysoev.ru>
date Tue, 06 Sep 2005 00:00:00 +0400
parents 2aa14f638cf0
children 71c46860eb55
comparison
equal deleted inserted replaced
87:5b7ec80c3c40 88:e916a291e9aa
422 len += r->method_name.len + 1 + u->conf->uri.len; 422 len += r->method_name.len + 1 + u->conf->uri.len;
423 } 423 }
424 424
425 escape = 0; 425 escape = 0;
426 426
427 loc_len = r->valid_location ? u->conf->location->len : 1; 427 loc_len = r->valid_location ? u->conf->location->len - 1 : 0;
428 428
429 if (plcf->upstream.pass_unparsed_uri && r->valid_unparsed_uri) { 429 if (plcf->upstream.pass_unparsed_uri && r->valid_unparsed_uri) {
430 len += r->unparsed_uri.len - 1; 430 len += r->unparsed_uri.len;
431 431
432 } else { 432 } else {
433 if (r->quoted_uri) { 433 if (r->quoted_uri) {
434 escape = 2 * ngx_escape_uri(NULL, r->uri.data + loc_len, 434 escape = 2 * ngx_escape_uri(NULL, r->uri.data + loc_len,
435 r->uri.len - loc_len, NGX_ESCAPE_URI); 435 r->uri.len - loc_len, NGX_ESCAPE_URI);
506 } else { 506 } else {
507 b->last = ngx_cpymem(b->last, r->method_name.data, 507 b->last = ngx_cpymem(b->last, r->method_name.data,
508 r->method_name.len + 1); 508 r->method_name.len + 1);
509 } 509 }
510 510
511 b->last = ngx_cpymem(b->last, u->conf->uri.data, u->conf->uri.len); 511 b->last = ngx_cpymem(b->last, u->conf->uri.data, u->conf->uri.len - 1);
512 512
513 if (plcf->upstream.pass_unparsed_uri && r->valid_unparsed_uri) { 513 if (plcf->upstream.pass_unparsed_uri && r->valid_unparsed_uri) {
514 b->last = ngx_cpymem(b->last, r->unparsed_uri.data + 1, 514 b->last = ngx_cpymem(b->last, r->unparsed_uri.data,
515 r->unparsed_uri.len - 1); 515 r->unparsed_uri.len);
516 } else { 516 } else {
517 if (escape) { 517 if (escape) {
518 ngx_escape_uri(b->last, r->uri.data + loc_len, 518 ngx_escape_uri(b->last, r->uri.data + loc_len,
519 r->uri.len - loc_len, NGX_ESCAPE_URI); 519 r->uri.len - loc_len, NGX_ESCAPE_URI);
520 b->last += r->uri.len - loc_len + escape; 520 b->last += r->uri.len - loc_len + escape;