yangzi129 / nginx-upstream-jvm-route

Automatically exported from code.google.com/p/nginx-upstream-jvm-route
0 stars 0 forks source link

cookie may not have a dash in it's name #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use a cookiename with a dash in it (eg. X-JSESSIONID)
   (jvm_route $cookie_X-JSESSIONID reverse;)
2.
3.

What is the expected output? What do you see instead?
expected : sticky session
instead : no sticky session

What version of the product are you using? On what operating system?
seen on: nginx 0.7.68, 0.8.54, 0.9.7, 1.0.0
Linux (Debian Wheezy)

Please provide any additional information below.
config http:
    upstream backend {
        server localhost:8080 srun_id=jvm0;
        server localhost:8180 srun_id=jvm1;

        jvm_route $cookie_X-JSESSIONID reverse;
    }

config server:
    location /myapp {
        proxy_pass http://backend;
    }

also tried 'jvm_route "$cookie_X-JSESSIONID" reverse;' but no luck.

Original issue reported on code.google.com by hajo.veg...@gmail.com on 24 Apr 2011 at 7:34

GoogleCodeExporter commented 9 years ago
Sorry, The dash is not supported in the cookie name in Nginx. Can you change 
the dash to underscores in the backends?

e.g. : jvm_route "$cookie_X_JSESSIONID" reverse;

Original comment by nbubi...@gmail.com on 25 Apr 2011 at 3:58

GoogleCodeExporter commented 9 years ago
Yes, that's possible and done.

Original comment by hajo.veg...@gmail.com on 7 May 2011 at 7:06