ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Re: subrequest headers ignored


  • To: nginx-ru@xxxxxxxxx
  • Subject: [SOLVED] Re: subrequest headers ignored
  • From: Konstantin Svist <fry.kun@xxxxxxxxx>
  • Date: Tue, 22 Nov 2011 14:17:33 -0800
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=SbtA4OENUlZ2J8V70tKjBFq4BXf+d0JQf7BlzW9TogQ=; b=AOqdgS3du6J5sDAS5uc/utfC/FqGp9WhDCFYn5z/GRGC0Vsge02PhnHtoiEzM08Oik Nk72QPTQLGtTQan7tjRHHjMhcdb8w2SnjrkRypWxp3J8+LvHWqkz5O6O1QDxLDcz38L4 qlgZTEXkpav9tk6693wy8IG6tdeDWeUNYgd5A=
  • In-reply-to: <4ECB07D4.90706@xxxxxxxxx>
  • References: <4ECB07D4.90706@xxxxxxxxx>

https://github.com/chaoslawful/lua-nginx-module/issues/6


On 11/21/2011 06:24 PM, Konstantin Svist wrote:
Подскажите пожалуйста, как такое лечится
Я хочу вытащить хэдеры из lua subrequest. Вроде по документации они должны сидеть в res.header, но там я только вижу ["Content-Type"] = "application/octet-stream";



location /foo {
content_by_lua 'local res = ngx.location.capture("/bar"); ngx.print(res.header["Foo"])';
}
location /bar {
  echo "baz";
  add_header "Foo" "Bar";
}



$ curl -v 'http://localhost/foo'
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /foo HTTP/1.1
> User-Agent: curl/7.21.3-DEV (x86_64-unknown-linux-gnu) libcurl/7.21.3-DEV OpenSSL/1.0.0 zlib/1.2.5 libssh2/1.2.4
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server:
< Date: Tue, 22 Nov 2011 02:18:18 GMT
< Content-Type: application/octet-stream
< Transfer-Encoding: chunked
< Connection: keep-alive
<
* Connection #0 to host localhost left intact
* Closing connection #0
nil#



$ curl -v 'http://localhost/bar'
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /bar HTTP/1.1
> User-Agent: curl/7.21.3-DEV (x86_64-unknown-linux-gnu) libcurl/7.21.3-DEV OpenSSL/1.0.0 zlib/1.2.5 libssh2/1.2.4
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server:
< Date: Tue, 22 Nov 2011 02:17:38 GMT
< Content-Type: application/octet-stream
< Transfer-Encoding: chunked
< Connection: keep-alive
< Foo: Bar
<
baz
* Connection #0 to host localhost left intact
* Closing connection #0



_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.