ПРОЕКТЫ 


  АРХИВ 


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]

subrequest headers ignored


  • To: nginx-ru@xxxxxxxxx
  • Subject: subrequest headers ignored
  • From: Konstantin Svist <fry.kun@xxxxxxxxx>
  • Date: Mon, 21 Nov 2011 18:24:20 -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 :content-type:content-transfer-encoding; bh=50q98jGEBOsT+zj7lG18014GWUtCtIREZI41wHEZ8rY=; b=wtlJ9Sk7u3HFLffGL5qHFpGGYUgPHI6lnz2kTwgYL8KUISeUg4v2z2mQJbnenSa6Mv SgYOZfvT3ay4nYYZf/UDjYo8vCzjH7bFLllWDCVD+gXV5Q62Mgg0fr+CrtwbYF5JKHGE BdlGUU3cTgfyzjbevApU1HLZDQcsapIU/Dc44=

Подскажите пожалуйста, как такое лечится
Я хочу вытащить хэдеры из 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.