BUrl: add a Redirect method

* This takes a relative path as a parameter, and modifies the object to
point to the given location.
 * '..' is not handled yet, and will be sent as-is to the server.
 * Makes it possible to follow more types of 302 redirects

In particular, I can now run the tests from Opera's testsuite
(testsuite.opera.com), which shows I have more work to do on cookie
handling.
This commit is contained in:
Adrien Destugues
2013-10-11 08:32:25 +02:00
parent 56434332b1
commit a5ac24f00c
2 changed files with 37 additions and 0 deletions
+1
View File
@@ -29,6 +29,7 @@ public:
BUrl& SetPath(const BString& path);
BUrl& SetRequest(const BString& request);
BUrl& SetFragment(const BString& fragment);
void Redirect(const BString& newLocation);
// URL fields access
const BString& UrlString() const;