Misc llcommon tidbits from v2.

This commit is contained in:
Shyotl
2011-03-15 02:28:22 -05:00
parent 343bb22b5c
commit 62d7f3d59f
9 changed files with 68 additions and 25 deletions

View File

@@ -46,10 +46,21 @@
void encode_character(std::ostream& ostr, std::string::value_type val)
{
ostr << "%" << std::uppercase << std::hex << std::setw(2) << std::setfill('0')
ostr << "%"
<< std::uppercase
<< std::hex
<< std::setw(2)
<< std::setfill('0')
// VWR-4010 Cannot cast to U32 because sign-extension on
// chars > 128 will result in FFFFFFC3 instead of F3.
<< static_cast<S32>(static_cast<U8>(val));
<< static_cast<S32>(static_cast<U8>(val))
// reset stream state
<< std::nouppercase
<< std::dec
<< std::setfill(' ');
}
// static
@@ -221,7 +232,8 @@ static BOOL isDefault(const std::string& scheme, U16 port)
void LLURI::parseAuthorityAndPathUsingOpaque()
{
if (mScheme == "http" || mScheme == "https" ||
mScheme == "ftp" || mScheme == "secondlife" )
mScheme == "ftp" || mScheme == "secondlife" ||
mScheme == "x-grid-location-info")
{
if (mEscapedOpaque.substr(0,2) != "//")
{