Skip to content

Commit

Permalink
Merge pull request alibaba#250 from dinic/session_sticky_bugfix1
Browse files Browse the repository at this point in the history
session_sticky_bugfix
  • Loading branch information
yaoweibin committed May 22, 2013
2 parents 940541b + 02e3cd1 commit 07b1a54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/http/modules/ngx_http_upstream_session_sticky_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,8 @@ ngx_http_session_sticky_header_filter(ngx_http_request_t *r)
}

if ((slcf->uscf == NGX_CONF_UNSET_PTR)
&& !(ctx->sscf->flag & NGX_HTTP_SESSION_STICKY_REWRITE))
&& ((ctx->sscf->flag & NGX_HTTP_SESSION_STICKY_PREFIX)
|| (ctx->sscf->flag & NGX_HTTP_SESSION_STICKY_INDIRECT)))
{
return ngx_http_ss_next_header_filter(r);
}
Expand Down
7 changes: 3 additions & 4 deletions tests/nginx-tests/cases/session_sticky.t
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ http {
}
upstream nothing {
session_sticky cookie=test maxidle=3600 option=indirect;
server 127.0.0.1:9000;
server 127.0.0.1:9001;
session_sticky cookie=test;
server 127.0.0.1:9002;
server 127.0.0.1:9003;
}
upstream insert_nocookie {
Expand Down Expand Up @@ -302,7 +302,6 @@ http {
}
location /test_nothing {
session_sticky_hide_cookie upstream=nothing;
proxy_pass http://nothing/;
}
}
Expand Down

0 comments on commit 07b1a54

Please sign in to comment.