Skip to content

Conversation

@csk-ableton
Copy link
Contributor

No description provided.

@glynos glynos self-assigned this Jul 27, 2018
@csk-ableton
Copy link
Contributor Author

@glynos Would be nice to get this upstream. Not sure if you forgot about it :)

ASSERT_EQ("http://example.com/foo", builder.uri());
}

TEST(builder_test, scheme_and_absolute_path) {
Copy link
Member

Choose a reason for hiding this comment

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

The test looks OK (and more tests are always good), but the other code modifications in this PR don't affect it. Can you explain what the fix is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

uri::initialize is called when building URIs from a ur_builder. So the code change is related to this test.

++it;
}
if (*it == '/' && *(it + 1) == '/') {
it += 2;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it's me, but I can't see what the difference is here. Is it just an optimisation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code is supposed to skip :// but would also skip :/ like in my example. The resulting URI would have the first slash of the path cut off. You can revert the code and see the result in the unit test.

@glynos
Copy link
Member

glynos commented Aug 3, 2018

@csk-ableton I thought I added some comments to the review, but I think I got confused by the new interface and they didn't show up. Let me know if you can't see the comments now.

@csk-ableton
Copy link
Contributor Author

@glynos I saw them and tried to answer your questions.

Copy link
Member

@glynos glynos left a comment

Choose a reason for hiding this comment

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

I get it now. To clarify what you fixed, can you add the following lines to this test before I merge it?

   ASSERT_EQ("foo", builder.uri().scheme());
   ASSERT_EQ("/bar", builder.uri().path());

@csk-ableton
Copy link
Contributor Author

I added the additional assertions and rebased in d6d0f9b

@glynos glynos merged commit 4dc3252 into cpp-netlib:master Aug 7, 2018
@glynos
Copy link
Member

glynos commented Aug 7, 2018

LGTM

@chfast
Copy link

chfast commented Aug 10, 2018

Can you make a new release with this fix please?

@glynos
Copy link
Member

glynos commented Aug 11, 2018

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.

3 participants