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

fix bug in patten search; enable set in http scope; enable work with … #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zls0424
Copy link

@zls0424 zls0424 commented Jan 25, 2019

  • fix bug in patten search, use ngx_strlcasestrn instead of ngx_strcasestrn
  • enable set in http scope
  • enable work with userid module

@AirisX
Copy link
Owner

AirisX commented Mar 13, 2019

Hello @zls0424 ,

can you give an example of a case that leads to a bug that you try to fix in first commit?

@zls0424
Copy link
Author

zls0424 commented Mar 14, 2019

Hello @zls0424 ,

can you give an example of a case that leads to a bug that you try to fix in first commit?

Hi AirisX,

when a cookie with name uuid is set in response header, like

set-cookie: uuid=ZylrjlyJ2oAoAQksA1O5Ag==; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/

then cookie names like uid, uuid, Ag set with set_cookie_flag will all match the cookie header line.

header->value.data = p; \
p[header->value.len] = '\0'; \
} \
} while(0)
Copy link

@edrandall edrandall Feb 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of the 'do..while' loop here, the original code has no such loop?
It's hard to follow how the original code maps into the macro refactoring.
Personally I would avoid large #define's and refactor the repeated-code-blocks into a function call, then add a unit test.

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 this pull request may close these issues.

3 participants