# Conflicts:
#	indra/llcorehttp/_httpoprequest.cpp
#	indra/llcorehttp/httpoptions.cpp
This commit is contained in:
Ansariel
2025-08-19 19:33:35 +02:00
6 changed files with 29 additions and 30 deletions
+9 -6
View File
@@ -546,7 +546,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
long sslHostV(0L);
long dnsCacheTimeout(-1L);
long nobody(0L);
long last_modified(0L); // <FS:Ansariel> GetIfModified request
curl_off_t lastModified(0L);
if (mReqOptions)
{
@@ -555,7 +555,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
sslHostV = mReqOptions->getSSLVerifyHost() ? 2L : 0L;
dnsCacheTimeout = mReqOptions->getDNSCacheTimeout();
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);
@@ -564,13 +564,16 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
check_curl_easy_setopt(mCurlHandle, CURLOPT_NOBODY, nobody);
// <FS:Ansariel> GetIfModified request
if (last_modified > 0)
if (lastModified)
{
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
// DNS lookups from LAN machines. If they happen too often,
+7 -9
View File
@@ -47,8 +47,8 @@ HttpOptions::HttpOptions() :
mVerifyPeer(sDefaultVerifyPeer),
mVerifyHost(false),
mDNSCacheTimeout(-1L),
mNoBody(false),
mLastModified(0) // <FS:Ansariel> GetIfModified request
mLastModified(0),
mNoBody(false)
{}
@@ -130,16 +130,14 @@ void HttpOptions::setHeadersOnly(bool nobody)
}
}
void HttpOptions::setLastModified(time_t lastModified)
{
mLastModified = lastModified;
}
void HttpOptions::setDefaultSSLVerifyPeer(bool verify)
{
sDefaultVerifyPeer = verify;
}
// <FS:Ansariel> GetIfModified request
void HttpOptions::setLastModified(long last_modified)
{
mLastModified = last_modified;
}
// </FS:Ansariel>
} // end namespace LLCore
+8 -10
View File
@@ -178,6 +178,13 @@ public:
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
/// security certificate matches the name of the host contacted.
/// Defaults false if not set, but should be set according to
@@ -185,14 +192,6 @@ public:
/// NoVerifySSLCert
static void setDefaultSSLVerifyPeer(bool verify);
// <FS:Ansariel> GetIfModified request
void setLastModified(long last_modified);
long getLastModified() const
{
return mLastModified;
}
// </FS:Ansariel>
protected:
bool mWantHeaders;
int mTracing;
@@ -207,10 +206,9 @@ protected:
bool mVerifyHost;
int mDNSCacheTimeout;
bool mNoBody;
time_t mLastModified;
static bool sDefaultVerifyPeer;
long mLastModified; // <FS:Ansariel> GetIfModified request
}; // end class HttpOptions
+2 -2
View File
@@ -949,7 +949,7 @@ std::string LLGridManager::getGridLabel(const std::string& grid)
{
std::string grid_label;
std::string grid_name = getGrid(grid);
if (!grid.empty())
if (!grid_name.empty())
{
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_name = getGrid(grid);
if (!grid.empty())
if (!grid_name.empty())
{
// FS:AW FIRE-7468
// NOTE: GRID_ID_VALUE has a different meaning in llviewernetwork
+2 -2
View File
@@ -468,7 +468,7 @@ std::string LLGridManager::getGridLabel(const std::string& grid)
{
std::string grid_label;
std::string grid_name = getGrid(grid);
if (!grid.empty())
if (!grid_name.empty())
{
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_name = getGrid(grid);
if (!grid.empty())
if (!grid_name.empty())
{
grid_id = mGridList[grid_name][GRID_ID_VALUE].asString();
}
+1 -1
View File
@@ -42,7 +42,7 @@ _autobuild_env=os.environ.copy()
# Coerce stdout encoding to utf-8 as cygwin's will be detected as cp1252 otherwise.
_autobuild_env["PYTHONIOENCODING"] = "utf-8"
pkg_line=re.compile('^([\w-]+):\s+(.*)$')
pkg_line=re.compile(r'^([\w-]+):\s+(.*)$')
def autobuild(*args):
"""