Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts: # indra/llcorehttp/_httpoprequest.cpp # indra/llcorehttp/httpoptions.cppmaster
commit
e78ac58683
|
|
@ -546,7 +546,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
|
||||||
long sslHostV(0L);
|
long sslHostV(0L);
|
||||||
long dnsCacheTimeout(-1L);
|
long dnsCacheTimeout(-1L);
|
||||||
long nobody(0L);
|
long nobody(0L);
|
||||||
long last_modified(0L); // <FS:Ansariel> GetIfModified request
|
curl_off_t lastModified(0L);
|
||||||
|
|
||||||
if (mReqOptions)
|
if (mReqOptions)
|
||||||
{
|
{
|
||||||
|
|
@ -555,7 +555,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
|
||||||
sslHostV = mReqOptions->getSSLVerifyHost() ? 2L : 0L;
|
sslHostV = mReqOptions->getSSLVerifyHost() ? 2L : 0L;
|
||||||
dnsCacheTimeout = mReqOptions->getDNSCacheTimeout();
|
dnsCacheTimeout = mReqOptions->getDNSCacheTimeout();
|
||||||
nobody = mReqOptions->getHeadersOnly() ? 1L : 0L;
|
nobody = mReqOptions->getHeadersOnly() ? 1L : 0L;
|
||||||
last_modified = mReqOptions->getLastModified(); // <FS:Ansariel> GetIfModified request
|
lastModified = (curl_off_t)mReqOptions->getLastModified();
|
||||||
}
|
}
|
||||||
check_curl_easy_setopt(mCurlHandle, CURLOPT_FOLLOWLOCATION, follow_redirect);
|
check_curl_easy_setopt(mCurlHandle, CURLOPT_FOLLOWLOCATION, follow_redirect);
|
||||||
|
|
||||||
|
|
@ -564,13 +564,16 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
|
||||||
|
|
||||||
check_curl_easy_setopt(mCurlHandle, CURLOPT_NOBODY, nobody);
|
check_curl_easy_setopt(mCurlHandle, CURLOPT_NOBODY, nobody);
|
||||||
|
|
||||||
// <FS:Ansariel> GetIfModified request
|
if (lastModified)
|
||||||
if (last_modified > 0)
|
|
||||||
{
|
{
|
||||||
check_curl_easy_setopt(mCurlHandle, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
|
check_curl_easy_setopt(mCurlHandle, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
|
||||||
check_curl_easy_setopt(mCurlHandle, CURLOPT_TIMEVALUE, last_modified);
|
#if (LIBCURL_VERSION_NUM >= 0x073B00)
|
||||||
|
// requires curl 7.59.0
|
||||||
|
check_curl_easy_setopt(mCurlHandle, CURLOPT_TIMEVALUE_LARGE, lastModified);
|
||||||
|
#else
|
||||||
|
check_curl_easy_setopt(mCurlHandle, CURLOPT_TIMEVALUE, (long)lastModified);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// </FS:Ansariel>
|
|
||||||
|
|
||||||
// The Linksys WRT54G V5 router has an issue with frequent
|
// The Linksys WRT54G V5 router has an issue with frequent
|
||||||
// DNS lookups from LAN machines. If they happen too often,
|
// DNS lookups from LAN machines. If they happen too often,
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ HttpOptions::HttpOptions() :
|
||||||
mVerifyPeer(sDefaultVerifyPeer),
|
mVerifyPeer(sDefaultVerifyPeer),
|
||||||
mVerifyHost(false),
|
mVerifyHost(false),
|
||||||
mDNSCacheTimeout(-1L),
|
mDNSCacheTimeout(-1L),
|
||||||
mNoBody(false),
|
mLastModified(0),
|
||||||
mLastModified(0) // <FS:Ansariel> GetIfModified request
|
mNoBody(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -130,16 +130,14 @@ void HttpOptions::setHeadersOnly(bool nobody)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HttpOptions::setLastModified(time_t lastModified)
|
||||||
|
{
|
||||||
|
mLastModified = lastModified;
|
||||||
|
}
|
||||||
|
|
||||||
void HttpOptions::setDefaultSSLVerifyPeer(bool verify)
|
void HttpOptions::setDefaultSSLVerifyPeer(bool verify)
|
||||||
{
|
{
|
||||||
sDefaultVerifyPeer = verify;
|
sDefaultVerifyPeer = verify;
|
||||||
}
|
}
|
||||||
|
|
||||||
// <FS:Ansariel> GetIfModified request
|
|
||||||
void HttpOptions::setLastModified(long last_modified)
|
|
||||||
{
|
|
||||||
mLastModified = last_modified;
|
|
||||||
}
|
|
||||||
// </FS:Ansariel>
|
|
||||||
|
|
||||||
} // end namespace LLCore
|
} // end namespace LLCore
|
||||||
|
|
|
||||||
|
|
@ -178,6 +178,13 @@ public:
|
||||||
return mNoBody;
|
return mNoBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Default: 0
|
||||||
|
void setLastModified(time_t lastModified);
|
||||||
|
time_t getLastModified() const
|
||||||
|
{
|
||||||
|
return mLastModified;
|
||||||
|
}
|
||||||
|
|
||||||
/// Sets default behavior for verifying that the name in the
|
/// Sets default behavior for verifying that the name in the
|
||||||
/// security certificate matches the name of the host contacted.
|
/// security certificate matches the name of the host contacted.
|
||||||
/// Defaults false if not set, but should be set according to
|
/// Defaults false if not set, but should be set according to
|
||||||
|
|
@ -185,14 +192,6 @@ public:
|
||||||
/// NoVerifySSLCert
|
/// NoVerifySSLCert
|
||||||
static void setDefaultSSLVerifyPeer(bool verify);
|
static void setDefaultSSLVerifyPeer(bool verify);
|
||||||
|
|
||||||
// <FS:Ansariel> GetIfModified request
|
|
||||||
void setLastModified(long last_modified);
|
|
||||||
long getLastModified() const
|
|
||||||
{
|
|
||||||
return mLastModified;
|
|
||||||
}
|
|
||||||
// </FS:Ansariel>
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool mWantHeaders;
|
bool mWantHeaders;
|
||||||
int mTracing;
|
int mTracing;
|
||||||
|
|
@ -207,10 +206,9 @@ protected:
|
||||||
bool mVerifyHost;
|
bool mVerifyHost;
|
||||||
int mDNSCacheTimeout;
|
int mDNSCacheTimeout;
|
||||||
bool mNoBody;
|
bool mNoBody;
|
||||||
|
time_t mLastModified;
|
||||||
|
|
||||||
static bool sDefaultVerifyPeer;
|
static bool sDefaultVerifyPeer;
|
||||||
|
|
||||||
long mLastModified; // <FS:Ansariel> GetIfModified request
|
|
||||||
}; // end class HttpOptions
|
}; // end class HttpOptions
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -949,7 +949,7 @@ std::string LLGridManager::getGridLabel(const std::string& grid)
|
||||||
{
|
{
|
||||||
std::string grid_label;
|
std::string grid_label;
|
||||||
std::string grid_name = getGrid(grid);
|
std::string grid_name = getGrid(grid);
|
||||||
if (!grid.empty())
|
if (!grid_name.empty())
|
||||||
{
|
{
|
||||||
grid_label = mGridList[grid_name][GRID_LABEL_VALUE].asString();
|
grid_label = mGridList[grid_name][GRID_LABEL_VALUE].asString();
|
||||||
}
|
}
|
||||||
|
|
@ -1099,7 +1099,7 @@ std::string LLGridManager::getGridId(const std::string& grid)
|
||||||
{
|
{
|
||||||
std::string grid_id;
|
std::string grid_id;
|
||||||
std::string grid_name = getGrid(grid);
|
std::string grid_name = getGrid(grid);
|
||||||
if (!grid.empty())
|
if (!grid_name.empty())
|
||||||
{
|
{
|
||||||
// FS:AW FIRE-7468
|
// FS:AW FIRE-7468
|
||||||
// NOTE: GRID_ID_VALUE has a different meaning in llviewernetwork
|
// NOTE: GRID_ID_VALUE has a different meaning in llviewernetwork
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,7 @@ std::string LLGridManager::getGridLabel(const std::string& grid)
|
||||||
{
|
{
|
||||||
std::string grid_label;
|
std::string grid_label;
|
||||||
std::string grid_name = getGrid(grid);
|
std::string grid_name = getGrid(grid);
|
||||||
if (!grid.empty())
|
if (!grid_name.empty())
|
||||||
{
|
{
|
||||||
grid_label = mGridList[grid_name][GRID_LABEL_VALUE].asString();
|
grid_label = mGridList[grid_name][GRID_LABEL_VALUE].asString();
|
||||||
}
|
}
|
||||||
|
|
@ -484,7 +484,7 @@ std::string LLGridManager::getGridId(const std::string& grid)
|
||||||
{
|
{
|
||||||
std::string grid_id;
|
std::string grid_id;
|
||||||
std::string grid_name = getGrid(grid);
|
std::string grid_name = getGrid(grid);
|
||||||
if (!grid.empty())
|
if (!grid_name.empty())
|
||||||
{
|
{
|
||||||
grid_id = mGridList[grid_name][GRID_ID_VALUE].asString();
|
grid_id = mGridList[grid_name][GRID_ID_VALUE].asString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ _autobuild_env=os.environ.copy()
|
||||||
# Coerce stdout encoding to utf-8 as cygwin's will be detected as cp1252 otherwise.
|
# Coerce stdout encoding to utf-8 as cygwin's will be detected as cp1252 otherwise.
|
||||||
_autobuild_env["PYTHONIOENCODING"] = "utf-8"
|
_autobuild_env["PYTHONIOENCODING"] = "utf-8"
|
||||||
|
|
||||||
pkg_line=re.compile('^([\w-]+):\s+(.*)$')
|
pkg_line=re.compile(r'^([\w-]+):\s+(.*)$')
|
||||||
|
|
||||||
def autobuild(*args):
|
def autobuild(*args):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue