diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-06-10 20:42:42 +0300 | 
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-06-10 20:45:59 +0300 | 
| commit | c95b4bf3ea2b681d6d05468b07e60fedb71fa2cf (patch) | |
| tree | ac48b2f206bd5e00988fb277d7b7b93636cf215f /indra/llmessage | |
| parent | e7df06c32b5191a4da5f936fff935785e7f9e01c (diff) | |
Post-merge - trim trailing whitespace
Diffstat (limited to 'indra/llmessage')
| -rw-r--r-- | indra/llmessage/llassetstorage.cpp | 132 | ||||
| -rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 122 | 
2 files changed, 127 insertions, 127 deletions
| diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index b3390451a2..70a7a34a70 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -1,25 +1,25 @@ -/**  +/**   * @file llassetstorage.cpp   * @brief Implementation of the base asset storage system.   *   * $LicenseInfo:firstyear=2001&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2010, Linden Research, Inc. - *  + *   * 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. - *  + *   * 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. - *  + *   * 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$   */ @@ -74,18 +74,18 @@ namespace          return false;      } -// Rider: This is the general case of the operator declared above. The code compares the callback  -// passed into the LLAssetStorage functions to determine if there are duplicated requests for an  -// asset.  Unfortunately std::function does not provide a direct way to compare two variables so  -// we define the operator here.  -// XCode is not very happy with the variadic temples in use below so we will just define the specific  +// Rider: This is the general case of the operator declared above. The code compares the callback +// passed into the LLAssetStorage functions to determine if there are duplicated requests for an +// asset.  Unfortunately std::function does not provide a direct way to compare two variables so +// we define the operator here. +// XCode is not very happy with the variadic temples in use below so we will just define the specific  // case of comparing two LLGetAssetCallback objects since that is all we really use. -//  +//  //     template<typename T, typename... U>  //     bool operator == (const std::function<T(U...)> &a, const std::function <T(U...)> &b)  //     {  //         typedef T(fnType)(U...); -//  +//  //         auto fnPtrA = a.target<T(*)(U...)>();  //         auto fnPtrB = b.target<T(*)(U...)>();  //         if (fnPtrA && fnPtrB) @@ -112,8 +112,8 @@ LLAssetInfo::LLAssetInfo( void )  LLAssetInfo::LLAssetInfo( const LLUUID& object_id, const LLUUID& creator_id,                            LLAssetType::EType type, const char* name,                            const char* desc ) -    :   mUuid( object_id ),  -        mCreatorID( creator_id ),  +    :   mUuid( object_id ), +        mCreatorID( creator_id ),          mType( type )  {      setName( name ); @@ -355,7 +355,7 @@ void LLAssetStorage::_init(LLMessageSystem *msg,  LLAssetStorage::~LLAssetStorage()  {      mShutDown = true; -     +      _cleanupRequests(true, LL_ERR_CIRCUIT_GONE);      if (gMessageSystem) @@ -372,7 +372,7 @@ LLAssetStorage::~LLAssetStorage()  void LLAssetStorage::setUpstream(const LLHost &upstream_host)  {      LL_DEBUGS("AppInit") << "AssetStorage: Setting upstream provider to " << upstream_host << LL_ENDL; -     +      mUpstreamHost = upstream_host;  } @@ -398,7 +398,7 @@ void LLAssetStorage::_cleanupRequests(bool all, S32 error)              // if all is true, we want to clean up everything              // otherwise just check for timed out requests              // EXCEPT for upload timeouts -            if (all  +            if (all                  || ((RT_DOWNLOAD == rt)                      && LL_ASSET_STORAGE_TIMEOUT < (mt_secs - tmp->mTime)))              { @@ -406,7 +406,7 @@ void LLAssetStorage::_cleanupRequests(bool all, S32 error)                                           << (all ? "aborted" : "timed out") << " for "                                           << tmp->getUUID() << "."                                           << LLAssetType::lookup(tmp->getType()) << LL_ENDL; -                 +                  timed_out.push_front(tmp);                  iter = requests->erase(curiter);              } @@ -477,11 +477,11 @@ bool LLAssetStorage::findInCacheAndInvokeCallback(const LLUUID& uuid, LLAssetTyp  // GET routines  /////////////////////////////////////////////////////////////////////////// -// IW - uuid is passed by value to avoid side effects, please don't re-add &     +// IW - uuid is passed by value to avoid side effects, please don't re-add &  void LLAssetStorage::getAssetData(const LLUUID uuid, -                                  LLAssetType::EType type,  +                                  LLAssetType::EType type,                                    LLAssetStorage::LLGetAssetCallback callback, -                                  void *user_data,  +                                  void *user_data,                                    bool is_priority)  {      LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << LL_ENDL; @@ -546,9 +546,9 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,              LL_WARNS("AssetStorage") << "Asset vfile " << uuid << ":" << type << " found with bad size " << file.getSize() << ", removing" << LL_ENDL;              file.remove();          } -         +          bool duplicate = false; -         +          // check to see if there's a pending download of this uuid already          for (request_list_t::iterator iter = mPendingDownloads.begin();               iter != mPendingDownloads.end(); ++iter ) @@ -563,7 +563,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,                                               << "." << LLAssetType::lookup(type) << LL_ENDL;                      return;                  } -                 +                  // this is a duplicate request                  // queue the request, but don't actually ask for it again                  duplicate = true; @@ -571,11 +571,11 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,          }          if (duplicate)          { -            LL_DEBUGS("AssetStorage") << "Adding additional non-duplicate request for asset " << uuid  +            LL_DEBUGS("AssetStorage") << "Adding additional non-duplicate request for asset " << uuid                                        << "." << LLAssetType::lookup(type) << LL_ENDL;          } -         -        _queueDataRequest(uuid, type, callback, user_data, duplicate, is_priority);      + +        _queueDataRequest(uuid, type, callback, user_data, duplicate, is_priority);      }  } @@ -645,7 +645,7 @@ void LLAssetStorage::downloadCompleteCallback(      // Inefficient since we're doing a find through a list that may have thousands of elements.      // This is due for refactoring; we will probably change mPendingDownloads into a set. -    request_list_t::iterator download_iter = std::find(gAssetStorage->mPendingDownloads.begin(),  +    request_list_t::iterator download_iter = std::find(gAssetStorage->mPendingDownloads.begin(),                                                         gAssetStorage->mPendingDownloads.end(),                                                         req); @@ -668,7 +668,7 @@ void LLAssetStorage::downloadCompleteCallback(          if (vfile.getSize() <= 0)          {              LL_WARNS("AssetStorage") << "downloadCompleteCallback has non-existent or zero-size asset " << callback_id << LL_ENDL; -             +              result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE;              vfile.remove();          } @@ -693,13 +693,13 @@ void LLAssetStorage::downloadCompleteCallback(  void LLAssetStorage::getEstateAsset(      const LLHost &object_sim, -    const LLUUID &agent_id,  +    const LLUUID &agent_id,      const LLUUID &session_id, -    const LLUUID &asset_id,  -    LLAssetType::EType atype,  +    const LLUUID &asset_id, +    LLAssetType::EType atype,      EstateAssetType etype, -    LLGetAssetCallback callback,  -    void *user_data,  +    LLGetAssetCallback callback, +    void *user_data,      bool is_priority)  {      LL_DEBUGS() << "LLAssetStorage::getEstateAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << ", estatetype " << etype << LL_ENDL; @@ -723,7 +723,7 @@ void LLAssetStorage::getEstateAsset(      {          return;      } -     +      bool exists = LLFileSystem::getExists(asset_id, atype);      LLFileSystem file(asset_id, atype);      U32 size = exists ? file.getSize() : 0; @@ -836,21 +836,21 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback(  }  void LLAssetStorage::getInvItemAsset( -    const LLHost &object_sim,  -    const LLUUID &agent_id,  +    const LLHost &object_sim, +    const LLUUID &agent_id,      const LLUUID &session_id,      const LLUUID &owner_id, -    const LLUUID &task_id,  +    const LLUUID &task_id,      const LLUUID &item_id, -    const LLUUID &asset_id,  +    const LLUUID &asset_id,      LLAssetType::EType atype, -    LLGetAssetCallback callback,  -    void *user_data,  +    LLGetAssetCallback callback, +    void *user_data,      bool is_priority)  {      LL_DEBUGS() << "LLAssetStorage::getInvItemAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << LL_ENDL; -    bool exists = false;  +    bool exists = false;      U32 size = 0;      if(asset_id.notNull()) @@ -910,7 +910,7 @@ void LLAssetStorage::getInvItemAsset(              spi.setAsset(asset_id, atype);              LL_DEBUGS("ViewerAsset") << "requesting inv item id " << item_id << " asset_id " << asset_id << " type " << LLAssetType::lookup(atype) << LL_ENDL; -             +              // Set our destination file, and the completion callback.              LLTransferTargetParamsVFile tpvf;              tpvf.setAsset(asset_id, atype); @@ -984,9 +984,9 @@ void LLAssetStorage::downloadInvItemCompleteCallback(  // static  void LLAssetStorage::uploadCompleteCallback( -    const LLUUID& uuid,  -    void *user_data,  -    S32 result,  +    const LLUUID& uuid, +    void *user_data, +    S32 result,      LLExtStat ext_status) // StoreAssetData callback (fixed)  {      if (!gAssetStorage) @@ -1190,7 +1190,7 @@ const LLAssetRequest* LLAssetStorage::findRequest(const LLAssetStorage::request_                                                    LLAssetType::EType asset_type,                                                    const LLUUID& asset_id)  { -    if (requests)  +    if (requests)      {          // Search the requests list for the asset.          request_list_t::const_iterator iter = requests->begin(); @@ -1213,7 +1213,7 @@ LLAssetRequest* LLAssetStorage::findRequest(LLAssetStorage::request_list_t* requ                                              LLAssetType::EType asset_type,                                              const LLUUID& asset_id)  { -    if (requests)  +    if (requests)      {          // Search the requests list for the asset.          request_list_t::iterator iter = requests->begin(); @@ -1296,7 +1296,7 @@ bool LLAssetStorage::deletePendingRequestImpl(LLAssetStorage::request_list_t* re          delete req;          return true;      } -     +      return false;  } @@ -1340,14 +1340,14 @@ const char* LLAssetStorage::getErrorString(S32 status)      }  } -void LLAssetStorage::getAssetData(const LLUUID uuid,  -                                  LLAssetType::EType type,  -                                  void (*callback)(const char*,  -                                                   const LLUUID&,  -                                                   void *,  -                                                   S32,  -                                                   LLExtStat),  -                                  void *user_data,  +void LLAssetStorage::getAssetData(const LLUUID uuid, +                                  LLAssetType::EType type, +                                  void (*callback)(const char*, +                                                   const LLUUID&, +                                                   void *, +                                                   S32, +                                                   LLExtStat), +                                  void *user_data,                                    bool is_priority)  {      // check for duplicates here, since we're about to fool the normal duplicate checker @@ -1358,7 +1358,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,          auto cbptr = tmp->mDownCallback.target<void(*)(const LLUUID &, LLAssetType::EType, void *, S32, LLExtStat)>(); -        if (type == tmp->getType() &&  +        if (type == tmp->getType() &&              uuid == tmp->getUUID() &&              (cbptr && (*cbptr == legacyGetDataCallback)) &&              callback == ((LLLegacyAssetRequest *)tmp->mUserData)->mDownCallback && @@ -1369,8 +1369,8 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,              return;          }      } -     -     + +      LLLegacyAssetRequest *legacy = new LLLegacyAssetRequest;      legacy->mDownCallback = callback; @@ -1381,10 +1381,10 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,  }  // static -void LLAssetStorage::legacyGetDataCallback(const LLUUID &uuid,  +void LLAssetStorage::legacyGetDataCallback(const LLUUID &uuid,                                             LLAssetType::EType type, -                                           void *user_data,  -                                           S32 status,  +                                           void *user_data, +                                           S32 status,                                             LLExtStat ext_status)  {      LLLegacyAssetRequest *legacy = (LLLegacyAssetRequest *)user_data; @@ -1403,7 +1403,7 @@ void LLAssetStorage::legacyGetDataCallback(const LLUUID &uuid,          uuid.toString(uuid_str);          filename = llformat("%s.%s",gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_str).c_str(),LLAssetType::lookup(type)); -        LLFILE* fp = LLFile::fopen(filename, "wb");     /* Flawfinder: ignore */  +        LLFILE* fp = LLFile::fopen(filename, "wb");     /* Flawfinder: ignore */          if (fp)          {              const S32 buf_size = 65536; @@ -1458,7 +1458,7 @@ void LLAssetStorage::reportMetric( const LLUUID& asset_id, const LLAssetType::ET      std::string filename(in_filename);      if (filename.empty())          filename = ll_safe_string(file); -     +      // Create revised message - new_message = "in_message :: file:line"      std::stringstream new_message;      new_message << in_message << " :: " << filename << ":" << line; @@ -1531,7 +1531,7 @@ void LLAssetStorage::flushOldToxicAssets( bool force_it )  // Add an item to the toxic asset map  void LLAssetStorage::markAssetToxic( const LLUUID& uuid ) -{    +{      if ( !uuid.isNull() )      {          // Set the value to the current time.  Creates a new entry if needed diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 7619b46fed..684e96883f 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -1,4 +1,4 @@ -/**  +/**   * @file llcorehttputil.cpp   * @date 2014-08-25   * @brief Implementation of adapter and utility classes expanding the llcorehttp interfaces. @@ -6,21 +6,21 @@   * $LicenseInfo:firstyear=2014&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2014, Linden Research, Inc. - *  + *   * 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. - *  + *   * 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. - *  + *   * 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$   */ @@ -48,7 +48,7 @@ namespace LLCoreHttpUtil  const F32 HTTP_REQUEST_EXPIRY_SECS = 60.0f; -namespace  +namespace  {      const std::string   HTTP_LOGBODY_KEY("HTTPLogBodyOnError"); @@ -87,9 +87,9 @@ void logMessageFail(std::string logAuth, std::string url, std::string message)  }  //========================================================================= -/// The HttpRequestPumper is a utility class. When constructed it will poll the  +/// The HttpRequestPumper is a utility class. When constructed it will poll the  /// supplied HttpRequest once per frame until it is destroyed. -///  +///  class HttpRequestPumper  {  public: @@ -261,7 +261,7 @@ void HttpCoroHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespons      LLCore::HttpStatus status = response->getStatus();      if (status == LLCore::HttpStatus(LLCore::HttpStatus::LLCORE, LLCore::HE_HANDLE_NOT_FOUND)) -    {   // A response came in for a canceled request and we have not processed the  +    {   // A response came in for a canceled request and we have not processed the          // cancel yet.  Patience!          return;      } @@ -273,9 +273,9 @@ void HttpCoroHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespons          LLCore::HttpStatus::type_enum_t errType = status.getType();          LL_INFOS() -            << "Possible failure [" << status.toTerseString() << "] cannot "<< response->getRequestMethod()  +            << "Possible failure [" << status.toTerseString() << "] cannot "<< response->getRequestMethod()              << " url '" << response->getRequestURL() -            << "' because " << status.toString()  +            << "' because " << status.toString()              << LL_ENDL;          if ((errType >= 400) && (errType < 500))          { @@ -360,13 +360,13 @@ void HttpCoroHandler::writeStatusCodes(LLCore::HttpStatus status, const std::str  }  //========================================================================= -/// The HttpCoroLLSDHandler is a specialization of the LLCore::HttpHandler for  -/// interacting with coroutines. When the request is completed the response  +/// The HttpCoroLLSDHandler is a specialization of the LLCore::HttpHandler for +/// interacting with coroutines. When the request is completed the response  /// will be posted onto the supplied Event Pump. -///  +///  /// If the LLSD retrieved from through the HTTP connection is not in the form  /// of a LLSD::map it will be returned as in an llsd["content"] element. -///  +///  /// The LLSD posted back to the coroutine will have the following additions:  /// llsd["http_result"] -+- ["message"] - An error message returned from the HTTP status  ///                      +- ["status"]  - The status code associated with the HTTP call @@ -374,7 +374,7 @@ void HttpCoroHandler::writeStatusCodes(LLCore::HttpStatus status, const std::str  ///                      +- ["type"]    - The LLCore::HttpStatus type associted with the HTTP call  ///                      +- ["url"]     - The URL used to make the call.  ///                      +- ["headers"] - A map of name name value pairs with the HTTP headers. -///                       +///  class HttpCoroLLSDHandler : public HttpCoroHandler  {  public: @@ -390,7 +390,7 @@ HttpCoroLLSDHandler::HttpCoroLLSDHandler(LLEventStream &reply):      HttpCoroHandler(reply)  {  } -     +  LLSD HttpCoroLLSDHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status)  { @@ -424,7 +424,7 @@ LLSD HttpCoroLLSDHandler::handleSuccess(LLCore::HttpResponse * response, LLCore:  #endif      if (!success) -    {    +    {  #if 1          // Only emit a warning if we failed to parse when 'content-type' == 'application/llsd+xml'          LLCore::HttpHeaders::ptr_t headers(response->getHeaders()); @@ -440,13 +440,13 @@ LLSD HttpCoroLLSDHandler::handleSuccess(LLCore::HttpResponse * response, LLCore:              status = LLCore::HttpStatus(499, "Failed to deserialize LLSD.");          }  #endif -        // If we've gotten to this point and the result LLSD is still undefined  +        // If we've gotten to this point and the result LLSD is still undefined          // either there was an issue deserializing the body or the response was          // blank.  Create an empty map to hold the result either way.          result = LLSD::emptyMap();      }      else if (!result.isMap()) -    {   // The results are not themselves a map.  Move them down so that  +    {   // The results are not themselves a map.  Move them down so that          // this method can return a map to the caller.          // *TODO: Should it always do this?          LLSD newResult = LLSD::emptyMap(); @@ -476,13 +476,13 @@ LLSD HttpCoroLLSDHandler::parseBody(LLCore::HttpResponse *response, bool &succes  //======================================================================== -/// The HttpCoroRawHandler is a specialization of the LLCore::HttpHandler for  -/// interacting with coroutines.  -///  -/// In addition to the normal "http_results" the returned LLSD will contain  +/// The HttpCoroRawHandler is a specialization of the LLCore::HttpHandler for +/// interacting with coroutines. +/// +/// In addition to the normal "http_results" the returned LLSD will contain  /// an entry keyed with "raw" containing the unprocessed results of the HTTP  /// call. -///                       +///  class HttpCoroRawHandler : public HttpCoroHandler  {  public: @@ -515,9 +515,9 @@ LLSD HttpCoroRawHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::  #if 1      // This is the slower implementation.  It is safe vis-a-vi the const_cast<> and modification      // of a LLSD managed array but contains an extra (potentially large) copy. -    //  +    //      // *TODO: https://jira.secondlife.com/browse/MAINT-5221 -     +      LLSD::Binary data;      data.reserve(size);      bas >> std::noskipws; @@ -526,12 +526,12 @@ LLSD HttpCoroRawHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::      result[HttpCoroutineAdapter::HTTP_RESULTS_RAW] = data;  #else -    // This is disabled because it's dangerous.  See the other case for an  +    // This is disabled because it's dangerous.  See the other case for an      // alternate implementation.      // We create a new LLSD::Binary object and assign it to the result map. -    // The LLSD has created it's own copy so we retrieve it asBinary and const cast  +    // The LLSD has created it's own copy so we retrieve it asBinary and const cast      // the reference so that we can modify it. -    // *TODO: This is potentially dangerous... but I am trying to avoid a potentially  +    // *TODO: This is potentially dangerous... but I am trying to avoid a potentially      // large copy.      result[HttpCoroutineAdapter::HTTP_RESULTS_RAW] = LLSD::Binary();      LLSD::Binary &data = const_cast<LLSD::Binary &>( result[HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary() ); @@ -551,13 +551,13 @@ LLSD HttpCoroRawHandler::parseBody(LLCore::HttpResponse *response, bool &success  }  //======================================================================== -/// The HttpCoroJSONHandler is a specialization of the LLCore::HttpHandler for  -/// interacting with coroutines.  -///  -/// In addition to the normal "http_results" the returned LLSD will contain  -/// JSON entries will be converted into an LLSD map.  All results are considered  +/// The HttpCoroJSONHandler is a specialization of the LLCore::HttpHandler for +/// interacting with coroutines. +/// +/// In addition to the normal "http_results" the returned LLSD will contain +/// JSON entries will be converted into an LLSD map.  All results are considered  /// strings -///                       +///  class HttpCoroJSONHandler : public HttpCoroHandler  {  public: @@ -692,7 +692,7 @@ LLSD HttpCoroutineAdapter::postAndSuspend_(LLCore::HttpRequest::ptr_t &request,      checkDefaultHeaders(headers); -    // The HTTPCoroHandler does not self delete, so retrieval of a the contained  +    // The HTTPCoroHandler does not self delete, so retrieval of a the contained      // pointer from the smart pointer is safe in this case.      LLCore::HttpHandle hhandle = requestPostWithLLSD(request,          mPolicyId, url, body, options, headers, @@ -730,7 +730,7 @@ LLSD HttpCoroutineAdapter::postRawAndSuspend(LLCore::HttpRequest::ptr_t request,      return postAndSuspend_(request, url, rawbody, options, headers, httpHandler);  } -// *TODO: This functionality could be moved into the LLCore::Http library itself  +// *TODO: This functionality could be moved into the LLCore::Http library itself  // by having the CURL layer read the file directly.  LLSD HttpCoroutineAdapter::postFileAndSuspend(LLCore::HttpRequest::ptr_t request,      const std::string & url, std::string fileName, @@ -759,7 +759,7 @@ LLSD HttpCoroutineAdapter::postFileAndSuspend(LLCore::HttpRequest::ptr_t request      return postAndSuspend(request, url, fileData, options, headers);  } -// *TODO: This functionality could be moved into the LLCore::Http library itself  +// *TODO: This functionality could be moved into the LLCore::Http library itself  // by having the CURL layer read the file directly.  LLSD HttpCoroutineAdapter::postFileAndSuspend(LLCore::HttpRequest::ptr_t request,      const std::string & url, LLUUID assetId, LLAssetType::EType assetType, @@ -776,7 +776,7 @@ LLSD HttpCoroutineAdapter::postFileAndSuspend(LLCore::HttpRequest::ptr_t request          U8* fileBuffer;          fileBuffer = new U8[fileSize];          vfile.read(fileBuffer, fileSize); -         +          outs.write((char*)fileBuffer, fileSize);          delete[] fileBuffer;      } @@ -816,7 +816,7 @@ LLSD HttpCoroutineAdapter::postAndSuspend_(LLCore::HttpRequest::ptr_t &request,      checkDefaultHeaders(headers); -    // The HTTPCoroHandler does not self delete, so retrieval of a the contained  +    // The HTTPCoroHandler does not self delete, so retrieval of a the contained      // pointer from the smart pointer is safe in this case.      LLCore::HttpHandle hhandle = request->requestPost(mPolicyId, url, rawbody.get(),          options, headers, handler); @@ -873,7 +873,7 @@ LLSD HttpCoroutineAdapter::putAndSuspend_(LLCore::HttpRequest::ptr_t &request,      checkDefaultHeaders(headers); -    // The HTTPCoroHandler does not self delete, so retrieval of a the contained  +    // The HTTPCoroHandler does not self delete, so retrieval of a the contained      // pointer from the smart pointer is safe in this case.      LLCore::HttpHandle hhandle = requestPutWithLLSD(request,          mPolicyId, url, body, options, headers, @@ -900,7 +900,7 @@ LLSD HttpCoroutineAdapter::putAndSuspend_(LLCore::HttpRequest::ptr_t &request,      checkDefaultHeaders(headers); -    // The HTTPCoroHandler does not self delete, so retrieval of a the contained  +    // The HTTPCoroHandler does not self delete, so retrieval of a the contained      // pointer from the smart pointer is safe in this case.      LLCore::HttpHandle hhandle = request->requestPut(mPolicyId,          url, rawbody.get(), options, headers, handler); @@ -950,13 +950,13 @@ LLSD HttpCoroutineAdapter::getJsonAndSuspend(LLCore::HttpRequest::ptr_t request,  LLSD HttpCoroutineAdapter::getAndSuspend_(LLCore::HttpRequest::ptr_t &request,      const std::string & url, -    LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers,  +    LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers,      HttpCoroHandler::ptr_t &handler)  {      HttpRequestPumper pumper(request);      checkDefaultHeaders(headers); -    // The HTTPCoroHandler does not self delete, so retrieval of a the contained  +    // The HTTPCoroHandler does not self delete, so retrieval of a the contained      // pointer from the smart pointer is safe in this case.      LLCore::HttpHandle hhandle = request->requestGet(mPolicyId,          url, options, headers, handler); @@ -985,7 +985,7 @@ LLSD HttpCoroutineAdapter::deleteAndSuspend(LLCore::HttpRequest::ptr_t request,  }  LLSD HttpCoroutineAdapter::deleteJsonAndSuspend(LLCore::HttpRequest::ptr_t request, -    const std::string & url,  +    const std::string & url,      LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers)  {      LLEventStream  replyPump(mAdapterName + "Reply", true); @@ -996,13 +996,13 @@ LLSD HttpCoroutineAdapter::deleteJsonAndSuspend(LLCore::HttpRequest::ptr_t reque  LLSD HttpCoroutineAdapter::deleteAndSuspend_(LLCore::HttpRequest::ptr_t &request, -    const std::string & url, LLCore::HttpOptions::ptr_t &options,  +    const std::string & url, LLCore::HttpOptions::ptr_t &options,      LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler)  {      HttpRequestPumper pumper(request);      checkDefaultHeaders(headers); -    // The HTTPCoroHandler does not self delete, so retrieval of a the contained  +    // The HTTPCoroHandler does not self delete, so retrieval of a the contained      // pointer from the smart pointer is safe in this case.      LLCore::HttpHandle hhandle = request->requestDelete(mPolicyId,          url, options, headers, handler); @@ -1039,7 +1039,7 @@ LLSD HttpCoroutineAdapter::patchAndSuspend_(LLCore::HttpRequest::ptr_t &request,      checkDefaultHeaders(headers); -    // The HTTPCoroHandler does not self delete, so retrieval of a the contained  +    // The HTTPCoroHandler does not self delete, so retrieval of a the contained      // pointer from the smart pointer is safe in this case.      LLCore::HttpHandle hhandle = requestPatchWithLLSD(request,          mPolicyId, url, body, options, headers, @@ -1073,7 +1073,7 @@ LLSD HttpCoroutineAdapter::copyAndSuspend(LLCore::HttpRequest::ptr_t request,  LLSD HttpCoroutineAdapter::copyAndSuspend_(LLCore::HttpRequest::ptr_t &request, -    const std::string & url,  +    const std::string & url,      LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers,      HttpCoroHandler::ptr_t &handler)  { @@ -1081,9 +1081,9 @@ LLSD HttpCoroutineAdapter::copyAndSuspend_(LLCore::HttpRequest::ptr_t &request,      checkDefaultHeaders(headers); -    // The HTTPCoroHandler does not self delete, so retrieval of a the contained  +    // The HTTPCoroHandler does not self delete, so retrieval of a the contained      // pointer from the smart pointer is safe in this case. -    //  +    //      LLCore::HttpHandle hhandle = request->requestCopy(mPolicyId, url,          options, headers, handler); @@ -1123,9 +1123,9 @@ LLSD HttpCoroutineAdapter::moveAndSuspend_(LLCore::HttpRequest::ptr_t &request,      checkDefaultHeaders(headers); -    // The HTTPCoroHandler does not self delete, so retrieval of a the contained  +    // The HTTPCoroHandler does not self delete, so retrieval of a the contained      // pointer from the smart pointer is safe in this case. -    //  +    //      LLCore::HttpHandle hhandle = request->requestMove(mPolicyId, url,          options, headers, handler); @@ -1174,7 +1174,7 @@ void HttpCoroutineAdapter::cancelSuspendedOperation()      }  } -void HttpCoroutineAdapter::saveState(LLCore::HttpHandle yieldingHandle,  +void HttpCoroutineAdapter::saveState(LLCore::HttpHandle yieldingHandle,      LLCore::HttpRequest::ptr_t &request, HttpCoroHandler::ptr_t &handler)  {      mWeakRequest = request; @@ -1190,15 +1190,15 @@ void HttpCoroutineAdapter::cleanState()  }  /*static*/ -LLSD HttpCoroutineAdapter::buildImmediateErrorResult(const LLCore::HttpRequest::ptr_t &request,  -    const std::string &url)  +LLSD HttpCoroutineAdapter::buildImmediateErrorResult(const LLCore::HttpRequest::ptr_t &request, +    const std::string &url)  {      LLCore::HttpStatus status = request->getStatus();      LL_WARNS("CoreHTTP") << "Error posting to " << url << " Status=" << status.getStatus() <<          " message = " << status.getMessage() << LL_ENDL; -    // Mimic the status results returned from an http error that we had  -    // to wait on  +    // Mimic the status results returned from an http error that we had +    // to wait on      LLSD httpresults = LLSD::emptyMap();      HttpCoroHandler::writeStatusCodes(status, url, httpresults); @@ -1228,7 +1228,7 @@ void HttpCoroutineAdapter::callbackHttpGet(const std::string &url, LLCore::HttpR  /*static*/  void HttpCoroutineAdapter::messageHttpGet(const std::string &url, const std::string &success, const std::string &failure)  { -    completionCallback_t cbSuccess = (success.empty()) ? NULL :  +    completionCallback_t cbSuccess = (success.empty()) ? NULL :          static_cast<completionCallback_t>(boost::bind(&logMessageSuccess, "HttpCoroutineAdapter", url, success));      completionCallback_t cbFailure = (failure.empty()) ? NULL :          static_cast<completionCallback_t>(boost::bind(&logMessageFail, "HttpCoroutineAdapter", url, failure)); @@ -1253,7 +1253,7 @@ void HttpCoroutineAdapter::trivialGetCoro(std::string url, LLCore::HttpRequest::      LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);      if (!status) -    {    +    {          if (failure)          {              failure(httpResults); | 
