mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 05:57:36 +03:00
Only percent-encode non-printable ASCII chars(0x00-0x1f), non-ASCII
chars(>0x7f), ' ', '"', '<' and '>' for URIs supplied by user and remote server(usually Location header field).
This commit is contained in:
parent
74a049ddfc
commit
2799c9f0cc
2 changed files with 16 additions and 22 deletions
|
@ -102,13 +102,13 @@ void RequestTest::testSetUri17()
|
|||
CPPUNIT_ASSERT(v);
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("http"), req.getProtocol());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("host"), req.getHost());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("/file%3Cwith%252%20%20space"),
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("/file%3Cwith%2%20%20space"),
|
||||
req.getDir());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("file%20with%20space;param%25"),
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("file%20with%20space;param%"),
|
||||
req.getFile());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("?a=/?"), req.getQuery());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("http://host:80/file%3Cwith%252%20%20space"
|
||||
"/file%20with%20space;param%25?a=/?"),
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("http://host:80/file%3Cwith%2%20%20space"
|
||||
"/file%20with%20space;param%?a=/?"),
|
||||
req.getCurrentUri());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("http://host:80/file<with%2 %20space"
|
||||
"/file with space;param%?a=/?"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue