-
Notifications
You must be signed in to change notification settings - Fork 340
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
allow a host to have a path #967
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, mentioned a couple edge cases in the comments.
This part of the code is not touched really often, but I just merged a couple PR that introduced conflicts here. Sorry for the inconvenience... |
Thanks for the review @jcoupey , comments are addressed and master merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. One remaining improvement came to mind, I'll simply do this myself before formatting and merging.
index = host.find('/'); | ||
if (index != std::string::npos) { | ||
path = host.substr(index + 1) + "/"; | ||
host = host.substr(0, index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking: this is making a copy while we could simply host.erase(index)
.
Issue
fixes #966
Now this can be done (note, we're robust to (non-)existing trailing slash in the path):
Tasks
CHANGELOG.md
(remove if irrelevant)