Trivial changes, mostly to clean up diff noise. Majority of changes are comment corrections or licenseinfo updates. (does not include newview directory)

This commit is contained in:
Shyotl
2013-01-07 14:44:54 -06:00
parent 69e0738096
commit d71210e942
187 changed files with 3343 additions and 4244 deletions

View File

@@ -4,31 +4,25 @@
* @date 2006-02-08
* @brief Implementation of the LLURI class.
*
* $LicenseInfo:firstyear=2006&license=viewergpl$
*
* Copyright (c) 2006-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
* 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
* Copyright (C) 2010, Linden Research, Inc.
*
* 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
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* 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.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -43,6 +37,8 @@
// system includes
#include <boost/tokenizer.hpp>
#include <boost/algorithm/string/find_iterator.hpp>
#include <boost/algorithm/string/finder.hpp>
void encode_character(std::ostream& ostr, std::string::value_type val)
{
@@ -324,7 +320,7 @@ LLURI LLURI::buildHTTP(const std::string& prefix,
const LLSD& path)
{
LLURI result;
// TODO: deal with '/' '?' '#' in host_port
if (prefix.find("://") != prefix.npos)
{
@@ -349,15 +345,41 @@ LLURI LLURI::buildHTTP(const std::string& prefix,
result.mEscapedPath += "/" + escapePathComponent(it->asString());
}
}
else if(path.isString())
else if (path.isString())
{
result.mEscapedPath += "/" + escapePathComponent(path.asString());
std::string pathstr(path);
// Trailing slash is significant in HTTP land. If caller specified,
// make a point of preserving.
std::string last_slash;
std::string::size_type len(pathstr.length());
if (len && pathstr[len-1] == '/')
{
last_slash = "/";
}
// Escape every individual path component, recombining with slashes.
for (boost::split_iterator<std::string::const_iterator>
ti(pathstr, boost::first_finder("/")), tend;
ti != tend; ++ti)
{
// Eliminate a leading slash or duplicate slashes anywhere. (Extra
// slashes show up here as empty components.) This test also
// eliminates a trailing slash, hence last_slash above.
if (! ti->empty())
{
result.mEscapedPath
+= "/" + escapePathComponent(std::string(ti->begin(), ti->end()));
}
}
// Reinstate trailing slash, if any.
result.mEscapedPath += last_slash;
}
else if(path.isUndefined())
{
// do nothing
}
else
else
{
llwarns << "Valid path arguments to buildHTTP are array, string, or undef, you passed type"
<< path.type() << llendl;