-
Notifications
You must be signed in to change notification settings - Fork 304
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
formatting issues with embedded semi-colons #92
Comments
You have alternative notation that should work in theses cases : |
It's not just a cosmetic problem: we ran into the same issue and our site wasn't reachable at all with firefox because headers with newlines are disallowed in http2 (see here and here). @jdauphant: Why does the nginx role modify the strings at all? Wouldn't it be better to just remove the manipulations? |
+1 |
@andrenarchy Have you see the new notation ? (https://github.com/jdauphant/ansible-role-nginx/releases/tag/v1.2 ) Old notation are just keeped has compatibility |
Considering this bug, I guess removing the old, buggy notation and bumping the major version would be a sensible thing to do. |
@jdauphant Yes, it works with the "new notation". The question is: why should these strings be modified at all? Removing the string modifications wouldn't break compatibility – it would increase compatibility because it doesn't break headers anymore (and probably other settings). |
@nschloe I was thinking about that the time when I introduce the notation. |
If someone want to push a PR that remove old syntax and promote the new syntax, I will be happy to merge :) |
A site config that included this:
add_header X-Xss-Protection "1; mode=block" always
was making the formatting look odd because of the semi-colon in the middle of the statement. In the replace I tried adding a newline to match on the end of the line, e.g.
v.replace(";\n",";\n ")
which worked but its not a complete fix. Perhaps a regex match to end of line including any preceeding whitespace would work. Do you think this would be a useful fix?
The text was updated successfully, but these errors were encountered: