Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added: url option to set proxy for http streams

  • Loading branch information...
commit 3d86e4fff0a092b689f97076b4dddfc7d178696d 1 parent e6f195c
queeup authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 xbmc/filesystem/CurlFile.cpp
View
15 xbmc/filesystem/CurlFile.cpp
@@ -716,6 +716,21 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
SetCookie(value);
else if (name.Equals("Encoding"))
SetContentEncoding(value);
+ else if (name.Equals("Proxy") && !g_guiSettings.GetBool("network.usehttpproxy"))
+ if (name.Equals("ProxyUserPass"))
+ {
+ SetProxyUserPass(value);
+ }
+ if (value.Equals('http://'))
+ {
+ m_proxy = value;
+ }
+ else
+ {
+ m_proxy = "http://" + value;
+ }
+ SetProxy(m_proxy);
+ CLog::Log(LOGDEBUG, "Using proxy %s", m_proxy.c_str());
else if (name.Equals("noshout") && value.Equals("true"))
m_skipshout = true;
else

4 comments on commit 3d86e4f

@Memphiz

That won't work. "Equals" matches the whole string. You want to match only the start of it i guess?

@queeup
Owner

Ahhh ok. I add that just for if somebody add it proxy like with http://ip:port.

What do you suggest? I can do it like here
Force to use |Proxy=ip:port instead of Proxy=http://ip:port

@mikrohard

value.Left(strlen("http://")).Equals("http://")

Also... single quotes are used for characters in C... double quotes are for strings.

And don't forget to put everything that belongs into "else if" in between curly brackets.

@queeup
Owner

I missed that single quotes. Python habit :) thankx for the "else if" brackets also. Noob C mistakes

Please sign in to comment.
Something went wrong with that request. Please try again.