Skip to content

Commit

Permalink
Fixed bug issue 111. It seems there was a problem in the assignment o…
Browse files Browse the repository at this point in the history
…perators where the parsing was not done correctly, causing undefined behaviour.
  • Loading branch information
glynos committed Jun 30, 2012
1 parent 51fe256 commit bc2fbde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions include/network/uri/uri.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ class BOOST_URI_DECL uri {

}

//uri(const value_type *uri)
// : uri_(uri), is_valid_(false) {
// parse();
//}

uri(const string_type &uri)
: uri_(uri), is_valid_(false) {
parse();
Expand All @@ -69,13 +64,15 @@ class BOOST_URI_DECL uri {
}

uri &operator = (const uri &other) {
uri(other).swap(*this);
uri_ = other.uri_;
parse();
return *this;
}

uri &operator = (const string_type &uri_string) {
uri(uri_string).swap(*this);
return *this;
uri_ = uri_string;
parse();
return *this;
}

~uri() {
Expand Down
2 changes: 1 addition & 1 deletion libs/network/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ target_link_libraries(hello_world_client
cppnetlib-http-client
cppnetlib-http-client-connections)

target_link_libraries(uri_builder ${OPENSSL_LIBRARIES})
if (OPENSSL_FOUND)
target_link_libraries(uri_builder ${OPENSSL_LIBRARIES})
#target_link_libraries(http_client ${OPENSSL_LIBRARIES})
target_link_libraries(simple_wget ${OPENSSL_LIBRARIES})
target_link_libraries(atom_reader ${OPENSSL_LIBRARIES})
Expand Down

0 comments on commit bc2fbde

Please sign in to comment.