Skip to content

Instantly share code, notes, and snippets.

@loe
Created Jan 9, 2009
Embed
What would you like to do?
--- src/http/ngx_http_upstream.c 2009-01-09 11:37:58.000000000 -0800
+++ src/http/ngx_http_upstream.c 2009-01-09 12:03:18.000000000 -0800
@@ -1036,8 +1036,8 @@
{
ssize_t n;
ngx_int_t rc;
- ngx_str_t *uri, args;
- ngx_uint_t i, flags;
+ ngx_str_t *uri, args, *hs;
+ ngx_uint_t i, j, flags;
ngx_list_part_t *part;
ngx_table_elt_t *h;
ngx_connection_t *c;
@@ -1280,6 +1280,18 @@
return;
}
}
+ else {
+ hs = u->conf->pass_headers->elts;
+ for (j = 0; j < u->conf->pass_headers->nelts; j++) {
+ if (ngx_strncasecmp(hs[j].data, h[i].key.data, hs[j].len) == 0) {
+ if (ngx_http_upstream_copy_header_line(r, &h[i], 0) != NGX_OK) {
+ ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return;
+ }
+ break;
+ }
+ }
+ }
}
uri = &u->headers_in.x_accel_redirect->value;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment