Skip to content
Snippets Groups Projects
user avatar
Nat Goodspeed authored
The LLURI::buildHTTP() overloads that take an LLSD 'path' accept 'undefined',
LLSD::String and (LLSD::Array of LLSD::String). A sequence of path components
passed in an Array is constructed into a slash-separated path. There are unit
tests in lluri_test.cpp to exercise that case.
To my amazement, there were NO unit tests covering the case of an LLSD::String
path. The code for that case escaped and appended the entire passed string.
While that might be fine for a 'path' consisting of a single undecorated path
component, the available documentation does not forbid one from passing a path
containing slashes as well. But this had the dubious effect of replacing every
slash with %2F.
In particular, decomposing a URL string with one LLURI instance and
constructing another like it using LLURI::buildHTTP() was not symmetrical.
Having consulted with Richard, I made the string-path logic a bit more nuanced:
- The passed path string is split on slashes. Every path component is
  individually escaped, then recombined with slashes into the final path.
- Duplicate slashes are eliminated.
- The presence or absence of a trailing slash in the original path string is
  carefully respected.
Now that we've nailed down how it ought to behave -- added unit tests to
ensure that it DOES behave that way!!
7db0cb75
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..
tests
CMakeLists.txt
bitpack.cpp
bitpack.h
ctype_workaround.h
doublelinkedlist.h
imageids.cpp
imageids.h
indra_constants.cpp
indra_constants.h
is_approx_equal_fraction.h
linden_common.h
linked_lists.h
ll_template_cast.h
llaccountingcost.h
llagentconstants.h
llallocator.cpp
llallocator.h
llallocator_heap_profile.cpp
llallocator_heap_profile.h
llapp.cpp
llapp.h
llapr.cpp
llapr.h
llassettype.cpp
llassettype.h
llassoclist.h
llavatarconstants.h
llavatarname.cpp
llavatarname.h
llbase32.cpp
llbase32.h
llbase64.cpp
llbase64.h
llboost.h
llchat.h
llclickaction.h
llcommon.cpp
llcommon.h
llcommonutils.cpp
llcommonutils.h
llcoros.cpp
llcoros.h
llcrc.cpp
llcrc.h
llcriticaldamp.cpp
llcriticaldamp.h
llcursortypes.cpp
llcursortypes.h
lldarray.h
lldarrayptr.h
lldate.cpp
lldate.h
lldefs.h
lldeleteutils.h
lldependencies.cpp
lldependencies.h
lldepthstack.h
lldictionary.cpp
lldictionary.h
lldlinked.h
lldoubledispatch.h
lldqueueptr.h
llendianswizzle.h
llenum.h
llerror.cpp
llerror.h
llerrorcontrol.h
llerrorlegacy.h
llerrorthread.cpp
llerrorthread.h
llevent.cpp
llevent.h
lleventapi.cpp
lleventapi.h
lleventcoro.cpp
lleventcoro.h
lleventdispatcher.cpp
lleventdispatcher.h
lleventemitter.h
lleventfilter.cpp
lleventfilter.h
llevents.cpp
llevents.h
lleventtimer.cpp
lleventtimer.h
llextendedstatus.h
llfasttimer.h
llfasttimer_class.cpp
llfasttimer_class.h
llfile.cpp
llfile.h
llfindlocale.cpp
llfindlocale.h
llfixedbuffer.cpp
llfixedbuffer.h
llfoldertype.cpp
llfoldertype.h
llformat.cpp
llformat.h