[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10683: Test resolution of querystri
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10683: Test resolution of querystring and anchors in relative urls, and fix it (was broken) |
Date: |
Tue, 10 Mar 2009 10:34:10 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10683
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Tue 2009-03-10 10:34:10 +0100
message:
Test resolution of querystring and anchors in relative urls, and fix it (was
broken)
modified:
libbase/URL.cpp
testsuite/libbase/URLTest.cpp
=== modified file 'libbase/URL.cpp'
--- a/libbase/URL.cpp 2009-03-10 09:31:05 +0000
+++ b/libbase/URL.cpp 2009-03-10 09:34:10 +0000
@@ -290,14 +290,15 @@
// get dirname from basurl path
_path = basedir + in;
- split_anchor_from_path();
-
- split_querystring_from_path();
-
- normalize_path(_path);
-
}
+ split_anchor_from_path();
+
+ split_querystring_from_path();
+
+ normalize_path(_path);
+
+
}
/*public*/
=== modified file 'testsuite/libbase/URLTest.cpp'
--- a/testsuite/libbase/URLTest.cpp 2009-03-09 17:24:59 +0000
+++ b/testsuite/libbase/URLTest.cpp 2009-03-10 09:34:10 +0000
@@ -256,6 +256,28 @@
check_equals (u2.path(), "/");
}
+ { // Relative url with query string
+ URL u("http://pms.youtube.com:443/index.php?query=1");
+ URL u2("/?query", u);
+ check_equals (u2.protocol(), "http");
+ check_equals (u2.hostname(), "pms.youtube.com");
+ check_equals (u2.port(), "443");
+ check_equals (u2.path(), "/");
+ check_equals (u2.querystring(), "query");
+ check_equals (u2.anchor(), "");
+ }
+
+ { // Relative url with anchor
+ URL u("http://pms.youtube.com:443/index.php?query=1");
+ URL u2("/#anchor", u);
+ check_equals (u2.protocol(), "http");
+ check_equals (u2.hostname(), "pms.youtube.com");
+ check_equals (u2.port(), "443");
+ check_equals (u2.path(), "/");
+ check_equals (u2.querystring(), "");
+ check_equals (u2.anchor(), "anchor");
+ }
+
// TODO: Samba paths
}
- [Gnash-commit] /srv/bzr/gnash/trunk r10683: Test resolution of querystring and anchors in relative urls, and fix it (was broken),
Sandro Santilli <=