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

Update apache_conf regular expression to exclude whitespace. #2416

Merged
merged 4 commits into from Dec 22, 2017

Conversation

miah
Copy link
Contributor

@miah miah commented Dec 21, 2017

This PR updates the regular expression used in apache_conf to use a conditional lookahead to greedily or non-greedily capture configuration values to ensure our values don't end with whitespace.

Thanks to feedback from @adamleff and help from @jerryaldrichiii this fix now works without modifying SimpleConfig. =)

Fixes #1241

@miah miah requested a review from a team as a code owner December 21, 2017 22:33
@adamleff
Copy link
Contributor

@miah can you please rebase on master so we can try to get travis fixed for this PR?

Signed-off-by: Miah Johnson <miah@chia-pet.org>
trailing whitespace.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
array item. This is expected as we do not override the key_values
default setting of '1' when passing the raw configuration to
SimpleConfig.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
lookahead that checks if the line ends with one or more spaces. If the
lookahead succeeds we non-greedily capture, and when it fails we
greedily capture.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
Copy link
Contributor

@adamleff adamleff left a comment

Choose a reason for hiding this comment

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

Great fix, @miah!

@adamleff adamleff added the Type: Bug Feature not working as expected label Dec 22, 2017
Copy link
Contributor

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

Thank you @miah

@chris-rock chris-rock merged commit 685ba1b into master Dec 22, 2017
@chris-rock chris-rock deleted the miah/1241-02 branch December 22, 2017 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

apache_conf does not correctly parse server aliases
3 participants