lluri_test.cpp
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:26k
- /**
- * @file lluri_test.cpp
- * @brief LLURI unit tests
- * @date September 2006
- *
- * $LicenseInfo:firstyear=2006&license=viewergpl$
- *
- * Copyright (c) 2006-2010, Linden Research, Inc.
- *
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
- #include "linden_common.h"
- #include "../llsd.h"
- #include "../lluri.h"
- #include "../test/lltut.h"
- namespace tut
- {
- struct URITestData {
- void checkParts(const LLURI& u,
- const char* expectedScheme,
- const char* expectedOpaque,
- const char* expectedAuthority,
- const char* expectedPath,
- const char* expectedQuery = "")
- {
- ensure_equals("scheme", u.scheme(), expectedScheme);
- ensure_equals("opaque", u.opaque(), expectedOpaque);
- ensure_equals("authority", u.authority(), expectedAuthority);
- ensure_equals("path", u.path(), expectedPath);
- ensure_equals("query", u.query(), expectedQuery);
- }
- void escapeRoundTrip(const std::string& uri_raw_1)
- {
- std::string uri_esc_1(LLURI::escape(uri_raw_1));
- std::string uri_raw_2(LLURI::unescape(uri_esc_1));
- ensure_equals("escape/unescape raw", uri_raw_2, uri_raw_1);
- std::string uri_esc_2(LLURI::escape(uri_raw_2));
- ensure_equals("escape/unescape escaped", uri_esc_2, uri_esc_1);
- }
- };
-
- typedef test_group<URITestData> URITestGroup;
- typedef URITestGroup::object URITestObject;
- URITestGroup uriTestGroup("LLURI");
-
- template<> template<>
- void URITestObject::test<1>()
- {
- LLURI u("http://abc.com/def/ghi?x=37&y=hello");
- ensure_equals("scheme", u.scheme(), "http");
- ensure_equals("authority", u.authority(), "abc.com");
- ensure_equals("path", u.path(), "/def/ghi");
- ensure_equals("query", u.query(), "x=37&y=hello");
- ensure_equals("host name", u.hostName(), "abc.com");
- ensure_equals("host port", u.hostPort(), 80);
- LLSD query = u.queryMap();
- ensure_equals("query x", query["x"].asInteger(), 37);
- ensure_equals("query y", query["y"].asString(), "hello");
- query = LLURI::queryMap("x=22.23&y=https://lindenlab.com/");
- ensure_equals("query x", query["x"].asReal(), 22.23);
- ensure_equals("query y", query["y"].asURI().asString(), "https://lindenlab.com/");
- }
- template<> template<>
- void URITestObject::test<2>()
- {
- // empty string
- checkParts(LLURI(""), "", "", "", "");
- }
-
- template<> template<>
- void URITestObject::test<3>()
- {
- // no scheme
- checkParts(LLURI("foo"), "", "foo", "", "");
- checkParts(LLURI("foo%3A"), "", "foo:", "", "");
- }
- template<> template<>
- void URITestObject::test<4>()
- {
- // scheme w/o paths
- checkParts(LLURI("mailto:zero@ll.com"),
- "mailto", "zero@ll.com", "", "");
- checkParts(LLURI("silly://abc/def?foo"),
- "silly", "//abc/def?foo", "", "");
- }
- template<> template<>
- void URITestObject::test<5>()
- {
- // authority section
- checkParts(LLURI("http:///"),
- "http", "///", "", "/");
-
- checkParts(LLURI("http://abc"),
- "http", "//abc", "abc", "");
-
- checkParts(LLURI("http://a%2Fb/cd"),
- "http", "//a/b/cd", "a/b", "/cd");
-
- checkParts(LLURI("http://host?"),
- "http", "//host?", "host", "");
- }
- template<> template<>
- void URITestObject::test<6>()
- {
- // path section
- checkParts(LLURI("http://host/a/b/"),
- "http", "//host/a/b/", "host", "/a/b/");
-
- checkParts(LLURI("http://host/a%3Fb/"),
- "http", "//host/a?b/", "host", "/a?b/");
-
- checkParts(LLURI("http://host/a:b/"),
- "http", "//host/a:b/", "host", "/a:b/");
- }
- template<> template<>
- void URITestObject::test<7>()
- {
- // query string
- checkParts(LLURI("http://host/?"),
- "http", "//host/?", "host", "/", "");
-
- checkParts(LLURI("http://host/?x"),
- "http", "//host/?x", "host", "/", "x");
-
- checkParts(LLURI("http://host/??"),
- "http", "//host/??", "host", "/", "?");
-
- checkParts(LLURI("http://host/?%3F"),
- "http", "//host/??", "host", "/", "?");
- }
- template<> template<>
- void URITestObject::test<8>()
- {
- LLSD path;
- path.append("x");
- path.append("123");
- checkParts(LLURI::buildHTTP("host", path),
- "http", "//host/x/123", "host", "/x/123");
-
- LLSD query;
- query["123"] = "12";
- query["abcd"] = "abc";
- checkParts(LLURI::buildHTTP("host", path, query),
- "http", "//host/x/123?123=12&abcd=abc",
- "host", "/x/123", "123=12&abcd=abc");
- }
- template<> template<>
- void URITestObject::test<9>()
- {
- // test unescaped path components
- LLSD path;
- path.append("x@*//*$&^");
- path.append("123");
- checkParts(LLURI::buildHTTP("host", path),
- "http", "//host/x@*//*$&^/123", "host", "/x@*//*$&^/123");
- }
- template<> template<>
- void URITestObject::test<10>()
- {
- // test unescaped query components
- LLSD path;
- path.append("x");
- path.append("123");
- LLSD query;
- query["123"] = "?&*#//";
- query["**@&?//"] = "abc";
- checkParts(LLURI::buildHTTP("host", path, query),
- "http", "//host/x/123?**@&?//=abc&123=?&*#//",
- "host", "/x/123", "**@&?//=abc&123=?&*#//");
- }
- template<> template<>
- void URITestObject::test<11>()
- {
- // test unescaped host components
- LLSD path;
- path.append("x");
- path.append("123");
- LLSD query;
- query["123"] = "12";
- query["abcd"] = "abc";
- checkParts(LLURI::buildHTTP("hi123*33--}{:portstuffs", path, query),
- "http", "//hi123*33--}{:portstuffs/x/123?123=12&abcd=abc",
- "hi123*33--}{:portstuffs", "/x/123", "123=12&abcd=abc");
- }
-
- template<> template<>
- void URITestObject::test<12>()
- {
- // test funky host_port values that are actually prefixes
-
- checkParts(LLURI::buildHTTP("http://example.com:8080", LLSD()),
- "http", "//example.com:8080",
- "example.com:8080", "");
-
- checkParts(LLURI::buildHTTP("http://example.com:8080/", LLSD()),
- "http", "//example.com:8080/",
- "example.com:8080", "/");
- checkParts(LLURI::buildHTTP("http://example.com:8080/a/b", LLSD()),
- "http", "//example.com:8080/a/b",
- "example.com:8080", "/a/b");
- }
- template<> template<>
- void URITestObject::test<13>()
- {
- const std::string unreserved =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- "0123456789"
- "-._~";
- // test escape
- ensure_equals("escaping", LLURI::escape("abcdefg", "abcdef"), "abcdef%67");
- ensure_equals("escaping", LLURI::escape("|/&\+-_!@", ""), "%7C%2F%26%5C%2B%2D%5F%21%40");
- ensure_equals("escaping as query variable",
- LLURI::escape("http://10.0.1.4:12032/agent/god/agent-id/map/layer/?resume=http://station3.ll.com:12032/agent/203ad6df-b522-491d-ba48-4e24eb57aeff/send-postcard", unreserved + ":@!$'()*+,="),
- "http:%2F%2F10.0.1.4:12032%2Fagent%2Fgod%2Fagent-id%2Fmap%2Flayer%2F%3Fresume=http:%2F%2Fstation3.ll.com:12032%2Fagent%2F203ad6df-b522-491d-ba48-4e24eb57aeff%2Fsend-postcard");
- // French cedilla (C with squiggle, like in the word Francais) is UTF-8 C3 A7
- #if LL_WINDOWS
- #pragma warning(disable: 4309)
- #endif
- std::string cedilla;
- cedilla.push_back( (char)0xC3 );
- cedilla.push_back( (char)0xA7 );
- ensure_equals("escape UTF8", LLURI::escape( cedilla, unreserved), "%C3%A7");
- }
-
- template<> template<>
- void URITestObject::test<14>()
- {
- // make sure escape and unescape of empty strings return empty
- // strings.
- std::string uri_esc(LLURI::escape(""));
- ensure("escape string empty", uri_esc.empty());
- std::string uri_raw(LLURI::unescape(""));
- ensure("unescape string empty", uri_raw.empty());
- }
- template<> template<>
- void URITestObject::test<15>()
- {
- // do some round-trip tests
- escapeRoundTrip("http://secondlife.com");
- escapeRoundTrip("http://secondlife.com/url with spaces");
- escapeRoundTrip("http://bad[domain]name.com/");
- escapeRoundTrip("ftp://bill.gates@ms/micro$oft.com/c:\autoexec.bat");
- escapeRoundTrip("");
- }
- template<> template<>
- void URITestObject::test<16>()
- {
- // Test the default escaping
- // yes -- this mangles the url. This is expected behavior
- std::string simple("http://secondlife.com");
- ensure_equals(
- "simple http",
- LLURI::escape(simple),
- "http%3A%2F%2Fsecondlife.com");
- ensure_equals(
- "needs escape",
- LLURI::escape("http://get.secondlife.com/windows viewer"),
- "http%3A%2F%2Fget.secondlife.com%2Fwindows%20viewer");
- }
- template<> template<>
- void URITestObject::test<17>()
- {
- // do some round-trip tests with very long strings.
- escapeRoundTrip("Welcome to Second Life.We hope you'll have a richly rewarding experience, filled with creativity, self expression and fun.The goals of the Community Standards are simple: treat each other with respect and without harassment, adhere to local standards as indicated by simulator ratings, and refrain from any hate activity which slurs a real-world individual or real-world community. Behavioral Guidelines - The Big Six");
- escapeRoundTrip(
- "'asset_data':b(12100){'task_id':ucc706f2d-0b68-68f8-11a4-f1043ff35ca0}n{ntnametObject|ntpermissions 0nt{nttbase_maskt7fffffffnttowner_maskt7fffffffnttgroup_maskt00000000ntteveryone_maskt00000000nttnext_owner_maskt7fffffffnttcreator_idt13fd9595-a47b-4d64-a5fb-6da645f038e0nttowner_idt3c115e51-04f4-523c-9fa6-98aff1034730nttlast_owner_idt3c115e51-04f4-523c-9fa6-98aff1034730nttgroup_idt00000000-0000-0000-0000-000000000000nt}ntlocal_idt217444921nttotal_crct323nttypet2nttask_validt2nttravel_accesst13ntdisplayoptst2ntdisplaytypetvntpost-0.368634403t0.00781063363t-0.569040775ntoldpost150.117996t25.8658009t8.19664001ntrotationt-0.06293071806430816650390625t-0.6995697021484375t-0.7002241611480712890625t0.1277817934751510620117188ntchildpost-0.00499999989t-0.0359999985t0.307999998ntchildrott-0.515492737293243408203125t-0.46601200103759765625t0.529055416584014892578125t0.4870323240756988525390625ntscale"
- "t0.074629t0.289956t0.01ntsit_offsett0t0t0ntcamera_eye_offsett0t0t0ntcamera_at_offsett0t0t0ntsit_quatt0t0t0t1ntsit_hintt0ntstatet160ntmaterialt3ntsoundidt00000000-0000-0000-0000-000000000000ntsoundgaint0ntsoundradiust0ntsoundflagst0nttextcolort0 0 0 1ntselectedt0ntselectort00000000-0000-0000-0000-000000000000ntusephysicst0ntrotate_xt1ntrotate_yt1ntrotate_zt1ntphantomt0ntremote_script_access_pint0ntvolume_detectt0ntblock_grabst0ntdie_at_edget0ntreturn_at_edget0nttemporaryt0ntsandboxt0ntsandboxhomet0t0t0ntshape 0nt{nttpath 0ntt{ntttcurvet16ntttbegint0ntttendt1ntttscale_xt1ntttscale_yt1ntttshear_xt0ntttshear_yt0nttttwistt0nttttwist_begint0ntttradius_offsett0nttttaper_xt0nttttaper_yt0ntttrevolutionst1ntttskewt0ntt}nttprofile 0ntt{ntttcurvet1ntttbegint0ntttendt1nttthollowt0ntt}nt}ntf"
- "acest6nt{nttimageidtddde1ffc-678b-3cda-1748-513086bdf01bnttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtf54a0c32-3cd1-d49a-5b4f-7b792bebc204nttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtf54a0c32-3cd1-d49a-5b4f-7b792bebc204nttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtf54a0c32-3cd1-d49a-5b4f-7b792bebc204nttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtf54a0c32-3cd1-d49a-5b4f-7b792bebc204"
- "nttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtddde1ffc-678b-3cda-1748-513086bdf01bnttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett-1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}ntps_next_crct1ntgpw_biast1ntipt0ntcompletetTRUEntdelayt50000ntnextstartt0ntbirthtimet1061088050622956ntreztimet1094866329019785ntparceltimet1133568981980596nttax_ratet1.00084ntscratchpadt0nt{ntnt}ntsale_infot0nt{nttsale_typetnotnttsale_pricet10nt}ntcorrect_family_idt00000000-0000-0000-0000-000000000000nthas_rezzedt0ntpre_link_base_maskt7fffffffntlinked tchildntdefault_pay_pricet-2t1t5t10t20n}n{'task_id':u61fa7364-e151-0597-774c-523312dae31b}n{ntnametObject|ntpermissions 0nt{nttbase_maskt7fffff"
- "ffnttowner_maskt7fffffffnttgroup_maskt00000000ntteveryone_maskt00000000nttnext_owner_maskt7fffffffnttcreator_idt13fd9595-a47b-4d64-a5fb-6da645f038e0nttowner_idt3c115e51-04f4-523c-9fa6-98aff1034730nttlast_owner_idt3c115e51-04f4-523c-9fa6-98aff1034730nttgroup_idt00000000-0000-0000-0000-000000000000nt}ntlocal_idt217444922nttotal_crct324nttypet2nttask_validt2nttravel_accesst13ntdisplayoptst2ntdisplaytypetvntpost-0.367110789t0.00780026987t-0.566269755ntoldpost150.115005t25.8479004t8.18669987ntrotationt0.47332942485809326171875t-0.380102097988128662109375t-0.5734078884124755859375t0.550168216228485107421875ntchildpost-0.00499999989t-0.0370000005t0.305000007ntchildrott-0.736649334430694580078125t-0.03042060509324073791503906t-0.02784589119255542755126953t0.67501628398895263671875ntscalet0.074629t0.289956t0.01ntsit_offsett0t0t0ntcamera_eye_offsett0t0t0ntcamera_at_offsett0t0t0ntsit_quatt0t"
- "0t0t1ntsit_hintt0ntstatet160ntmaterialt3ntsoundidt00000000-0000-0000-0000-000000000000ntsoundgaint0ntsoundradiust0ntsoundflagst0nttextcolort0 0 0 1ntselectedt0ntselectort00000000-0000-0000-0000-000000000000ntusephysicst0ntrotate_xt1ntrotate_yt1ntrotate_zt1ntphantomt0ntremote_script_access_pint0ntvolume_detectt0ntblock_grabst0ntdie_at_edget0ntreturn_at_edget0nttemporaryt0ntsandboxt0ntsandboxhomet0t0t0ntshape 0nt{nttpath 0ntt{ntttcurvet16ntttbegint0ntttendt1ntttscale_xt1ntttscale_yt1ntttshear_xt0ntttshear_yt0nttttwistt0nttttwist_begint0ntttradius_offsett0nttttaper_xt0nttttaper_yt0ntttrevolutionst1ntttskewt0ntt}nttprofile 0ntt{ntttcurvet1ntttbegint0ntttendt1nttthollowt0ntt}nt}ntfacest6nt{nttimageidtddde1ffc-678b-3cda-1748-513086bdf01bnttcolorst0.937255 0.796078 0.494118 1nttscalest1nt"
- "tscalett1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtf54a0c32-3cd1-d49a-5b4f-7b792bebc204nttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtf54a0c32-3cd1-d49a-5b4f-7b792bebc204nttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtf54a0c32-3cd1-d49a-5b4f-7b792bebc204nttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtf54a0c32-3cd1-d49a-5b4f-7b792bebc204nttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett1nttoffsetst0nttoffsettt0nttimagerott0nt"
- "tbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidtddde1ffc-678b-3cda-1748-513086bdf01bnttcolorst0.937255 0.796078 0.494118 1nttscalest1nttscalett-1nttoffsetst0nttoffsettt0nttimagerott0nttbumpt0nttfullbrightt0nttmedia_flagst0nt}ntps_next_crct1ntgpw_biast1ntipt0ntcompletetTRUEntdelayt50000ntnextstartt0ntbirthtimet1061087839248891ntreztimet1094866329020800ntparceltimet1133568981981983nttax_ratet1.00084ntscratchpadt0nt{ntnt}ntsale_infot0nt{nttsale_typetnotnttsale_pricet10nt}ntcorrect_family_idt00000000-0000-0000-0000-000000000000nthas_rezzedt0ntpre_link_base_maskt7fffffffntlinked tchildntdefault_pay_pricet-2t1t5t10t20n}n{'task_id':ub8d68643-7dd8-57af-0d24-8790032aed0c}n{ntnametObject|ntpermissions 0nt{nttbase_maskt7fffffffnttowner_maskt7fffffffnttgroup_maskt00000000ntteveryone_maskt00000000nttnext_owner_maskt7fffffffnttcreat"
- "or_idt13fd9595-a47b-4d64-a5fb-6da645f038e0nttowner_idt3c115e51-04f4-523c-9fa6-98aff1034730nttlast_owner_idt3c115e51-04f4-523c-9fa6-98aff1034730nttgroup_idt00000000-0000-0000-0000-000000000000nt}ntlocal_idt217444923nttotal_crct235nttypet2nttask_validt2nttravel_accesst13ntdisplayoptst2ntdisplaytypetvntpost-0.120029509t-0.00284469454t-0.0302077383ntoldpost150.710999t25.8584995t8.19172001ntrotationt0.145459949970245361328125t-0.1646589934825897216796875t0.659558117389678955078125t-0.718826770782470703125ntchildpost0t-0.182999998t-0.26699999ntchildrott0.991444766521453857421875t3.271923924330621957778931e-05t-0.0002416197530692443251609802t0.1305266767740249633789062ntscalet0.0382982t0.205957t0.368276ntsit_offsett0t0t0ntcamera_eye_offsett0t0t0ntcamera_at_offsett0t0t0ntsit_quatt0t0t0t1ntsit_hintt0ntstatet160ntmaterialt3ntsoundidt00000000-0000-0000-0000-000000000000ntsoundgaint0ntsoundra"
- "diust0ntsoundflagst0nttextcolort0 0 0 1ntselectedt0ntselectort00000000-0000-0000-0000-000000000000ntusephysicst0ntrotate_xt1ntrotate_yt1ntrotate_zt1ntphantomt0ntremote_script_access_pint0ntvolume_detectt0ntblock_grabst0ntdie_at_edget0ntreturn_at_edget0nttemporaryt0ntsandboxt0ntsandboxhomet0t0t0ntshape 0nt{nttpath 0ntt{ntttcurvet32ntttbegint0.3ntttendt0.65ntttscale_xt1ntttscale_yt0.05ntttshear_xt0ntttshear_yt0nttttwistt0nttttwist_begint0ntttradius_offsett0nttttaper_xt0nttttaper_yt0ntttrevolutionst1ntttskewt0ntt}nttprofile 0ntt{ntttcurvet0ntttbegint0ntttendt1nttthollowt0ntt}nt}ntfacest3nt{nttimageidte7150bed-3e3e-c698-eb15-d17b178148afnttcolorst0.843137 0.156863 0.156863 1nttscalest15nttscalett1nttoffsetst0nttoffsettt0nttimagerott-1.57084nttbumpt0nttfullbrightt0nttmedia_flagst0"
- "nt}nt{nttimageidte7150bed-3e3e-c698-eb15-d17b178148afnttcolorst0.843137 0.156863 0.156863 1nttscalest15nttscalett1nttoffsetst0nttoffsettt0nttimagerott-1.57084nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidte7150bed-3e3e-c698-eb15-d17b178148afnttcolorst0.843137 0.156863 0.156863 1nttscalest15nttscalett1nttoffsetst0nttoffsettt0nttimagerott-1.57084nttbumpt0nttfullbrightt0nttmedia_flagst0nt}ntps_next_crct1ntgpw_biast1ntipt0ntcompletetTRUEntdelayt50000ntnextstartt0ntbirthtimet1061087534454174ntreztimet1094866329021741ntparceltimet1133568981982889nttax_ratet1.00326ntscratchpadt0nt{ntnt}ntsale_infot0nt{nttsale_typetnotnttsale_pricet10nt}ntcorrect_family_idt00000000-0000-0000-0000-000000000000nthas_rezzedt0ntpre_link_base_maskt7fffffffntlinked tchildntdefault_pay_pricet-2t1t5t10t20n}n{'task_id':ue4b19200-9d33-962f-c8c5-6f"
- "25be3a3fd0}n{ntnametApotheosis_Immolaine_tail|ntpermissions 0nt{nttbase_maskt7fffffffnttowner_maskt7fffffffnttgroup_maskt00000000ntteveryone_maskt00000000nttnext_owner_maskt7fffffffnttcreator_idt13fd9595-a47b-4d64-a5fb-6da645f038e0nttowner_idt3c115e51-04f4-523c-9fa6-98aff1034730nttlast_owner_idt3c115e51-04f4-523c-9fa6-98aff1034730nttgroup_idt00000000-0000-0000-0000-000000000000nt}ntlocal_idt217444924nttotal_crct675nttypet1nttask_validt2nttravel_accesst13ntdisplayoptst2ntdisplaytypetvntpost-0.34780401t-0.00968400016t-0.260098994ntoldpost0t0t0ntrotationt0.73164522647857666015625t-0.67541944980621337890625t-0.07733880728483200073242188t0.05022468417882919311523438ntvelocityt0t0t0ntangvelt0t0t0ntscalet0.0382982t0.32228t0.383834ntsit_offsett0t0t0ntcamera_eye_offsett0t0t0ntcamera_at_offsett0t0t0ntsit_quatt0t0t0t1ntsit_hintt0ntstatet160ntmaterialt3ntsoundidt00000"
- "000-0000-0000-0000-000000000000ntsoundgaint0ntsoundradiust0ntsoundflagst0nttextcolort0 0 0 1ntselectedt0ntselectort00000000-0000-0000-0000-000000000000ntusephysicst0ntrotate_xt1ntrotate_yt1ntrotate_zt1ntphantomt0ntremote_script_access_pint0ntvolume_detectt0ntblock_grabst0ntdie_at_edget0ntreturn_at_edget0nttemporaryt0ntsandboxt0ntsandboxhomet0t0t0ntshape 0nt{nttpath 0ntt{ntttcurvet32ntttbegint0.3ntttendt0.65ntttscale_xt1ntttscale_yt0.05ntttshear_xt0ntttshear_yt0nttttwistt0nttttwist_begint0ntttradius_offsett0nttttaper_xt0nttttaper_yt0ntttrevolutionst1ntttskewt0ntt}nttprofile 0ntt{ntttcurvet0ntttbegint0ntttendt1nttthollowt0ntt}nt}ntfacest3nt{nttimageidte7150bed-3e3e-c698-eb15-d17b178148afnttcolorst0.843137 0.156863 0.156863 1nttscalest15nttscalett1nttoffsetst0nttoffsettt0nttimagerott-1"
- ".57084nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidte7150bed-3e3e-c698-eb15-d17b178148afnttcolorst0.843137 0.156863 0.156863 1nttscalest15nttscalett1nttoffsetst0nttoffsettt0nttimagerott-1.57084nttbumpt0nttfullbrightt0nttmedia_flagst0nt}nt{nttimageidte7150bed-3e3e-c698-eb15-d17b178148afnttcolorst0.843137 0.156863 0.156863 1nttscalest15nttscalett1nttoffsetst0nttoffsettt0nttimagerott-1.57084nttbumpt0nttfullbrightt0nttmedia_flagst0nt}ntps_next_crct1ntgpw_biast1ntipt0ntcompletetTRUEntdelayt50000ntnextstartt0ntbirthtimet1061087463950186ntreztimet1094866329022555ntparceltimet1133568981984359ntdescriptiont(No Description)|nttax_ratet1.01736ntnamevaluetAttachPt U32 RW S 10ntnamevaluetAttachmentOrientation VEC3 RW DS -3.110088, -0.182018, 1.493795ntnamevaluetAttachmentOffset VEC3 RW DS -0.347804, -0.009684, -0.260099ntnamevaluetAttachItemI"
- "D STRING RW SV 20f36c3a-b44b-9bc7-87f3-018bfdfc8cdantscratchpadt0nt{ntnt}ntsale_infot0nt{nttsale_typetnotnttsale_pricet10nt}ntorig_asset_idt8747acbc-d391-1e59-69f1-41d06830e6c0ntorig_item_idt20f36c3a-b44b-9bc7-87f3-018bfdfc8cdantfrom_task_idt3c115e51-04f4-523c-9fa6-98aff1034730ntcorrect_family_idt00000000-0000-0000-0000-000000000000nthas_rezzedt0ntpre_link_base_maskt7fffffffntlinked tlinkedntdefault_pay_pricet-2t1t5t10t20n}n");
- }
-
- template<> template<>
- void URITestObject::test<18>()
- {
- LLURI u("secondlife:///app/login?first_name=Testert4&last_name=Tester&web_login_key=test");
- // if secondlife is the scheme, LLURI should parse /app/login as path, with no authority
- ensure_equals("scheme", u.scheme(), "secondlife");
- ensure_equals("authority", u.authority(), "");
- ensure_equals("path", u.path(), "/app/login");
- ensure_equals("pathmap", u.pathArray()[0].asString(), "app");
- ensure_equals("pathmap", u.pathArray()[1].asString(), "login");
- ensure_equals("query", u.query(), "first_name=Testert4&last_name=Tester&web_login_key=test");
- ensure_equals("query map element", u.queryMap()["last_name"].asString(), "Tester");
-
- u = LLURI("secondlife://Da Boom/128/128/128");
- // if secondlife is the scheme, LLURI should parse /128/128/128 as path, with Da Boom as authority
- ensure_equals("scheme", u.scheme(), "secondlife");
- ensure_equals("authority", u.authority(), "Da Boom");
- ensure_equals("path", u.path(), "/128/128/128");
- ensure_equals("pathmap", u.pathArray()[0].asString(), "128");
- ensure_equals("pathmap", u.pathArray()[1].asString(), "128");
- ensure_equals("pathmap", u.pathArray()[2].asString(), "128");
- ensure_equals("query", u.query(), "");
- }
- template<> template<>
- void URITestObject::test<19>()
- {
- // Parse about: schemes
- LLURI u("about:blank?redirect-http-hack=secondlife%3A%2F%2F%2Fapp%2Flogin%3Ffirst_name%3DCallum%26last_name%3DLinden%26location%3Dspecify%26grid%3Dvaak%26region%3D%2FMorris%2F128%2F128%26web_login_key%3Defaa4795-c2aa-4c58-8966-763c27931e78");
- ensure_equals("scheme", u.scheme(), "about");
- ensure_equals("authority", u.authority(), "");
- ensure_equals("path", u.path(), "blank");
- ensure_equals("pathmap", u.pathArray()[0].asString(), "blank");
- ensure_equals("query", u.query(), "redirect-http-hack=secondlife:///app/login?first_name=Callum&last_name=Linden&location=specify&grid=vaak®ion=/Morris/128/128&web_login_key=efaa4795-c2aa-4c58-8966-763c27931e78");
- ensure_equals("query map element", u.queryMap()["redirect-http-hack"].asString(), "secondlife:///app/login?first_name=Callum&last_name=Linden&location=specify&grid=vaak®ion=/Morris/128/128&web_login_key=efaa4795-c2aa-4c58-8966-763c27931e78");
- }
- }