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

Respect AWS_VIRTUAL_HOSTING env var #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

craigds
Copy link

@craigds craigds commented Oct 14, 2024

workaround for #56

if (value->empty())
{
// env var is set to the empty string; interpret as false
return false;
Copy link
Owner

Choose a reason for hiding this comment

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

I wonder if this is backwards from what would be expected, e.g. if I run VERBOSE ./my-app I might expect that I've set VERBOSE to be enabled rather than disabled.

}

const char firstChar = std::tolower((*value)[0]);
if (firstChar == 't' || firstChar == 'T' || firstChar == '1')
Copy link
Owner

Choose a reason for hiding this comment

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

I think we can skip the lower/upper-case checks since we've already done tolower on our character.

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.

2 participants