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

Issue #195: Add support for --uri option. #196

Closed
wants to merge 1 commit into from

Conversation

quicksketch
Copy link
Member

Initial work to support --uri option: #195

To test:

Using https vs. http, sub-directories, and port numbers should all work.

@yorkshire-pudding yorkshire-pudding changed the title Issue #95: Add support for --uri option. Issue #195: Add support for --uri option. Oct 31, 2022
Copy link
Collaborator

@yorkshire-pudding yorkshire-pudding left a comment

Choose a reason for hiding this comment

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

@quicksketch
The suggested change fixes the error I encountered at #195 (comment)

Please also see my query regarding URI vs URL at the same comment. I don't mind if there is a good reason for using uri such as continuity for drush users, but if not, I think url may be clearer and would be consistent with the language used in settings.php.


if ($_bee_options['uri']) {
$uri_parts = parse_url($_bee_options['uri']);
$_SERVER['HTTP_HOST'] = $uri_parts['host'] . ($uri_parts['port'] ? ':' . $uri_parts['port'] : '');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
$_SERVER['HTTP_HOST'] = $uri_parts['host'] . ($uri_parts['port'] ? ':' . $uri_parts['port'] : '');
$_SERVER['HTTP_HOST'] = $uri_parts['host'] . (isset($uri_parts['port']) ? ':' . $uri_parts['port'] : '');

This gets rid of the errors if no port is used.

@yorkshire-pudding
Copy link
Collaborator

Agreed with @quicksketch to close this in favour of new PR from me with revisions included.
See #276

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