Преглед на файлове

Merge pull request #804 from wangkx/gh-803

Fix gh-803 User-Agent not set if no LDAP enabled

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman преди 13 години
родител
ревизия
2e9b308f67
променени са 2 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 0 3
      esp/bindings/http/platform/httpbinding.cpp
  2. 4 0
      esp/bindings/http/platform/httptransport.cpp

+ 0 - 3
esp/bindings/http/platform/httpbinding.cpp

@@ -450,9 +450,6 @@ void EspHttpBinding::populateRequest(CHttpRequest *request)
 
     ctx->setSecManger(m_secmgr.getLink());
     ctx->setFeatureAuthMap(m_feature_authmap.getLink());
-    StringBuffer useragent;
-    request->getHeader("User-Agent", useragent);
-    ctx->setUseragent(useragent.str());
 
     StringBuffer userid, password,realm,peer;
     ctx->getUserID(userid);

+ 4 - 0
esp/bindings/http/platform/httptransport.cpp

@@ -1517,6 +1517,10 @@ void CHttpRequest::updateContext()
             else
                 m_context->setClientVersion(0.0);
         }
+
+        StringBuffer useragent;
+        getHeader("User-Agent", useragent);
+        m_context->setUseragent(useragent.str());
     }
 }