Skip to content

Allow a forward slash to be prefixed for paths that don't have them in the builder #51

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

Merged
merged 4 commits into from
May 24, 2014

Conversation

glynos
Copy link
Member

@glynos glynos commented May 10, 2014

See #50

@glynos glynos changed the title Fix for issue #50 Allow a forward slash to be prefixed for paths that don't have them in the builder May 10, 2014
@johnco3
Copy link

johnco3 commented May 10, 2014

Thanks Glyn, unfortunately this is broken as the internal path_ optional
still keeps the path without the leading slash character. It still works
if I make sure that my paths always start with / - i.e. you do not have to
adjust for them.

Consider the following:

    network::uri_builder bldr;
    bldr.scheme("ftp").host(gHomeFTPHost);
    bldr.path("noleadingslash/foo.txt");
    auto path = bldr.uri().path().get().to_string();

auto path ends up as "/noleadingslash/foo.tx"

Note that the last character is stripped - even though you do correctly
have the adjustment for the leading slash correct.

John

On Sat, May 10, 2014 at 7:04 AM, Glyn Matthews [email protected]:

See #50 #50

You can merge this Pull Request by running

git pull https://github.com/glynos/uri master

Or view, comment on, or merge it at:

#51
Commit Summary

  • Paths that are not prefixed with a slash passed to the uri_builder
    are now prefixed.
  • Fixed code found by failing test due to change in builder.

File Changes

Patch Links:


Reply to this email directly or view it on GitHubhttps://github.com//pull/51
.

glynos added a commit that referenced this pull request May 24, 2014
Allow a forward slash to be prefixed for paths that don't have them in the builder
@glynos glynos merged commit c6dd135 into cpp-netlib:master May 24, 2014
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