Mercurial > hg > nginx-vendor-0-8
comparison src/http/modules/ngx_http_proxy_module.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 | 820f6378fc00 |
children | 12defd37f578 |
comparison
equal
deleted
inserted
replaced
381:23d1555141d9 | 382:984bb0b1399b |
---|---|
962 | 962 |
963 u->headers_in.status_n = ctx->status; | 963 u->headers_in.status_n = ctx->status; |
964 u->state->status = ctx->status; | 964 u->state->status = ctx->status; |
965 | 965 |
966 u->headers_in.status_line.len = ctx->status_end - ctx->status_start; | 966 u->headers_in.status_line.len = ctx->status_end - ctx->status_start; |
967 u->headers_in.status_line.data = ngx_palloc(r->pool, | 967 u->headers_in.status_line.data = ngx_pnalloc(r->pool, |
968 u->headers_in.status_line.len); | 968 u->headers_in.status_line.len); |
969 if (u->headers_in.status_line.data == NULL) { | 969 if (u->headers_in.status_line.data == NULL) { |
970 return NGX_ERROR; | 970 return NGX_ERROR; |
971 } | 971 } |
972 | 972 |
973 ngx_memcpy(u->headers_in.status_line.data, ctx->status_start, | 973 ngx_memcpy(u->headers_in.status_line.data, ctx->status_start, |
1218 h->hash = r->header_hash; | 1218 h->hash = r->header_hash; |
1219 | 1219 |
1220 h->key.len = r->header_name_end - r->header_name_start; | 1220 h->key.len = r->header_name_end - r->header_name_start; |
1221 h->value.len = r->header_end - r->header_start; | 1221 h->value.len = r->header_end - r->header_start; |
1222 | 1222 |
1223 h->key.data = ngx_palloc(r->pool, | 1223 h->key.data = ngx_pnalloc(r->pool, |
1224 h->key.len + 1 + h->value.len + 1 + h->key.len); | 1224 h->key.len + 1 + h->value.len + 1 + h->key.len); |
1225 if (h->key.data == NULL) { | 1225 if (h->key.data == NULL) { |
1226 return NGX_ERROR; | 1226 return NGX_ERROR; |
1227 } | 1227 } |
1228 | 1228 |
1398 } | 1398 } |
1399 | 1399 |
1400 v->len = r->headers_in.x_forwarded_for->value.len | 1400 v->len = r->headers_in.x_forwarded_for->value.len |
1401 + sizeof(", ") - 1 + r->connection->addr_text.len; | 1401 + sizeof(", ") - 1 + r->connection->addr_text.len; |
1402 | 1402 |
1403 p = ngx_palloc(r->pool, v->len); | 1403 p = ngx_pnalloc(r->pool, v->len); |
1404 if (p == NULL) { | 1404 if (p == NULL) { |
1405 return NGX_ERROR; | 1405 return NGX_ERROR; |
1406 } | 1406 } |
1407 | 1407 |
1408 v->data = p; | 1408 v->data = p; |
1433 | 1433 |
1434 v->valid = 1; | 1434 v->valid = 1; |
1435 v->no_cacheable = 0; | 1435 v->no_cacheable = 0; |
1436 v->not_found = 0; | 1436 v->not_found = 0; |
1437 | 1437 |
1438 v->data = ngx_palloc(r->connection->pool, NGX_SIZE_T_LEN); | 1438 v->data = ngx_pnalloc(r->connection->pool, NGX_SIZE_T_LEN); |
1439 | 1439 |
1440 if (v->data == NULL) { | 1440 if (v->data == NULL) { |
1441 return NGX_ERROR; | 1441 return NGX_ERROR; |
1442 } | 1442 } |
1443 | 1443 |
1490 return NGX_DECLINED; | 1490 return NGX_DECLINED; |
1491 } | 1491 } |
1492 | 1492 |
1493 len = prefix + pr->replacement.text.len + h->value.len - pr->redirect.len; | 1493 len = prefix + pr->replacement.text.len + h->value.len - pr->redirect.len; |
1494 | 1494 |
1495 data = ngx_palloc(r->pool, len); | 1495 data = ngx_pnalloc(r->pool, len); |
1496 if (data == NULL) { | 1496 if (data == NULL) { |
1497 return NGX_ERROR; | 1497 return NGX_ERROR; |
1498 } | 1498 } |
1499 | 1499 |
1500 p = data; | 1500 p = data; |
1542 while (*(uintptr_t *) e.ip) { | 1542 while (*(uintptr_t *) e.ip) { |
1543 lcode = *(ngx_http_script_len_code_pt *) e.ip; | 1543 lcode = *(ngx_http_script_len_code_pt *) e.ip; |
1544 len += lcode(&e); | 1544 len += lcode(&e); |
1545 } | 1545 } |
1546 | 1546 |
1547 data = ngx_palloc(r->pool, len); | 1547 data = ngx_pnalloc(r->pool, len); |
1548 if (data == NULL) { | 1548 if (data == NULL) { |
1549 return NGX_ERROR; | 1549 return NGX_ERROR; |
1550 } | 1550 } |
1551 | 1551 |
1552 p = data; | 1552 p = data; |