Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect cookie name in http_upstream sticky directive #1285

Open
hbog opened this issue Dec 13, 2018 · 1 comment · May be fixed by #1286
Open

incorrect cookie name in http_upstream sticky directive #1285

hbog opened this issue Dec 13, 2018 · 1 comment · May be fixed by #1286

Comments

@hbog
Copy link
Contributor

hbog commented Dec 13, 2018

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet:all
  • Ruby:all
  • Distribution:all
  • Module version: v0.15.0

How to reproduce (e.g Puppet code you use)

nginx::resource::upstream { $title:
  sticky  => {
    'cookie' => {
      'name' => 'srv_id',
      'expires' => '7d',
      'domain' => 'example.com', 
      'path' => '/'
    }
  },
  members  => $members,
}

What are you seeing

code above results in an incorrect sticky directive in upstream.conf:

sticky cookie name=srv_id expires=7d domain=example.com path=/

and a Set-Cookie response header:

Set-Cookie: name=srv_id=e4000322f27372a178fcc291d1178b37; expires=...

This will generally not be noticed from a functional point of view, but the name of the cookie is not as expected.

What behaviour did you expect instead

sticky directive in upstream.conf:

sticky cookie srv_id expires=7d domain=example.com path=/

and a Set-Cookie response header:

Set-Cookie: srv_id=e4000322f27372a178fcc291d1178b37; expires=...

Any additional information you'd like to impart

Syntax for the sticky directive in the nginx documentation:

sticky   cookie name   [expires=time]  [domain=domain]  [httponly]  [secure]  [path=path];

The first parameter sets the name of the cookie to be set or inspected.

@hbog
Copy link
Contributor Author

hbog commented Dec 13, 2018

fixed in PR #1286

@hbog hbog linked a pull request Dec 15, 2018 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant