summaryrefslogtreecommitdiff
path: root/indra/llmessage/llurlrequest.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-10-19 11:45:42 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-10-19 11:45:42 -0400
commit4dd15ae27d1216044da57455eaa2a4832f86915f (patch)
tree277056b7e3c98a3f4305c1a3553ee0ee18a8eb1c /indra/llmessage/llurlrequest.cpp
parentd65d451448573f95b065a9be7c88ff239d5ed8be (diff)
parentdd61baa3401a09bd8ff1e894514c15390946cdb3 (diff)
merge
Diffstat (limited to 'indra/llmessage/llurlrequest.cpp')
-rw-r--r--indra/llmessage/llurlrequest.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp
index 91a5a8ce2c..fa03bb7512 100644
--- a/indra/llmessage/llurlrequest.cpp
+++ b/indra/llmessage/llurlrequest.cpp
@@ -41,7 +41,6 @@
#include "llstring.h"
#include "apr_env.h"
#include "llapr.h"
-#include "llscopedvolatileaprpool.h"
static const U32 HTTP_STATUS_PIPE_ERROR = 499;
/**
@@ -212,31 +211,27 @@ void LLURLRequest::setCallback(LLURLRequestComplete* callback)
// is called with use_proxy = FALSE
void LLURLRequest::useProxy(bool use_proxy)
{
- static std::string env_proxy;
+ static char *env_proxy;
- if (use_proxy && env_proxy.empty())
+ if (use_proxy && (env_proxy == NULL))
{
- char* env_proxy_str;
- LLScopedVolatileAPRPool scoped_pool;
- apr_status_t status = apr_env_get(&env_proxy_str, "ALL_PROXY", scoped_pool);
+ apr_status_t status;
+ LLAPRPool pool;
+ status = apr_env_get(&env_proxy, "ALL_PROXY", pool.getAPRPool());
if (status != APR_SUCCESS)
{
- status = apr_env_get(&env_proxy_str, "http_proxy", scoped_pool);
+ status = apr_env_get(&env_proxy, "http_proxy", pool.getAPRPool());
}
if (status != APR_SUCCESS)
{
- use_proxy = false;
+ use_proxy = FALSE;
}
- else
- {
- // env_proxy_str is stored in the scoped_pool, so we have to make a copy.
- env_proxy = env_proxy_str;
- }
}
- LL_DEBUGS("Proxy") << "use_proxy = " << (use_proxy?'Y':'N') << ", env_proxy = " << (!env_proxy.empty() ? env_proxy : "(null)") << LL_ENDL;
- if (use_proxy && !env_proxy.empty())
+ lldebugs << "use_proxy = " << (use_proxy?'Y':'N') << ", env_proxy = " << (env_proxy ? env_proxy : "(null)") << llendl;
+
+ if (env_proxy && use_proxy)
{
mDetail->mCurlRequest->setoptString(CURLOPT_PROXY, env_proxy);
}