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

httpd lens Apache parsing error with conditional statements and (empty) comments #577

Closed
joohoi opened this issue Jul 25, 2018 · 1 comment

Comments

@joohoi
Copy link

joohoi commented Jul 25, 2018

Hi, one of our users stumbled upon an issue where Augeas would fail to parse their configuration. I was able to narrow the exact issue down to a case that is indeed a bit strange looking.

In short: If there's a empty comment line (a whitespace character required after hash) after an If statement, Augeas fails to parse the file.

Example snippet (GitHub markdown might remove the whitespace after hash):

  <If "%{HTTP_HOST} == 'example.com'">
    # 
    Order Allow,Deny
    allow from All
  </If>
lutter added a commit to lutter/augeas that referenced this issue Aug 10, 2018
We used to only deal with completely empty comments after a tag opening a
section, for example '<If cond>#\n', but not with a comment that consisted
only of whitespace like '<If cond># \n'. We now accept both cases,
resulting in the same tree.

Fixes hercules-team#577
@lutter
Copy link
Member

lutter commented Aug 10, 2018

Thanks for reporting this and whittling it down to something I could easily play with. PR #579 should address 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

No branches or pull requests

2 participants