diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2012-07-28 21:28:00 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2012-07-28 21:28:00 +0200 |
commit | ff98cc74fd06ef167eb2404ce93051d92dd75caf (patch) | |
tree | ab71535e9fd32bd7d9fa122b3e7937633d819c0e /tests/url/test1.cpp | |
parent | 3856d7214b3b3eb3e5b8c3ac025b7aeeb93cd044 (diff) | |
download | crawler-ff98cc74fd06ef167eb2404ce93051d92dd75caf.tar.gz crawler-ff98cc74fd06ef167eb2404ce93051d92dd75caf.tar.bz2 |
heavy redesign of URL class, must not contain any parsing logic as
it is the caninic representation
URLNormalizers are used for intepreting strings and contexts as URL
currently nothing runs :-)
Diffstat (limited to 'tests/url/test1.cpp')
-rw-r--r-- | tests/url/test1.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/url/test1.cpp b/tests/url/test1.cpp index 64ae223..677bf10 100644 --- a/tests/url/test1.cpp +++ b/tests/url/test1.cpp @@ -1,4 +1,5 @@ #include "URL.hpp" +#include "SimpleURLNormalizer.hpp" #include <iostream> #include <string> @@ -14,7 +15,9 @@ int main( int argc, char *argv[] ) char *urlstring = argv[1]; - URL url( urlstring ); + URLNormalizer *normalizer = new SimpleURLNormalizer( ); + URL url = normalizer->parseUrl( urlstring ); + delete normalizer; cout << "protocol: " << url.protocol( ) << endl << "port: " << url.port( ) << endl |