Support network-path reference in HTTP redirect.

This commit is contained in:
Tatsuhiro Tsujikawa 2012-01-11 02:17:38 +09:00
parent 2997fa0631
commit a6803c21b5
2 changed files with 13 additions and 1 deletions

View file

@ -137,6 +137,11 @@ void RequestTest::testRedirectUri()
"relativepath/to/file"),
req.getCurrentUri());
CPPUNIT_ASSERT_EQUAL(4, req.getRedirectCount());
// Give network-path reference
CPPUNIT_ASSERT(req.redirectUri("//host/to/file"));
CPPUNIT_ASSERT_EQUAL(std::string("http://host/to/file"), req.getCurrentUri());
CPPUNIT_ASSERT_EQUAL(5, req.getRedirectCount());
}
void RequestTest::testRedirectUri2()