the $upstream_addr variable is empty when enable keepalive
kindy
kindy61 at gmail.com
Thu Apr 26 02:11:48 UTC 2012
hi,
from nginx 1.1.13 to 1.2.0.
the conf:
upstream a {
server 127.0.0.1:8083;
keepalive 10 single;
}
server {
listen 8083;
keepalive_timeout 10;
location = /a {
}
location = /b {
proxy_http_version 1.1;
proxy_set_header Connection keep-alive;
add_header upname "abc[$upstream_addr]dd";
proxy_pass http://a/a;
}
}
- - - - - - - - -
$ touch html/a
$ curl -i localhost:8083/b
HTTP/1.1 200 OK
Server: nginx/1.2.0
Date: Thu, 26 Apr 2012 02:07:12 GMT
Content-Type: application/octet-stream
Content-Length: 0
Connection: keep-alive
Last-Modified: Thu, 26 Apr 2012 02:01:02 GMT
Accept-Ranges: bytes
upname: abc[127.0.0.1:8083]dd
$ curl -i localhost:8083/b
HTTP/1.1 200 OK
Server: nginx/1.2.0
Date: Thu, 26 Apr 2012 02:07:12 GMT
Content-Type: application/octet-stream
Content-Length: 0
Connection: keep-alive
Last-Modified: Thu, 26 Apr 2012 02:01:02 GMT
Accept-Ranges: bytes
upname: abc[]dd
--
林青(Kindy Lin)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20120426/690d697a/attachment.html>
More information about the nginx-devel
mailing list