fix bug in patten search; enable set in http scope; enable work with …#8
fix bug in patten search; enable set in http scope; enable work with …#8zls0424 wants to merge 2 commits intoAirisX:masterfrom
Conversation
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
|
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
then cookie names like |
| header->value.data = p; \ | ||
| p[header->value.len] = '\0'; \ | ||
| } \ | ||
| } while(0) |
There was a problem hiding this comment.
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.