Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
ac40aef7
Commit
ac40aef7
authored
May 25, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HTTP: remove --http-use-IE-proxy and assume it is always true
Nobody is ever going to use this if it needs to be enabled.
parent
5192e2f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
57 deletions
+37
-57
modules/access/http.c
modules/access/http.c
+37
-57
No files found.
modules/access/http.c
View file @
ac40aef7
...
...
@@ -97,11 +97,6 @@ static void Close( vlc_object_t * );
#define FORWARD_COOKIES_TEXT N_("Forward Cookies")
#define FORWARD_COOKIES_LONGTEXT N_("Forward Cookies across http redirections.")
#define USE_IE_PROXY_TEXT N_("Use Internet Explorer entered HTTP proxy server")
#define USE_IE_PROXY_LONGTEXT N_("Use Internet Explorer entered HTTP proxy " \
"server for all URL. Don't take into account bypasses settings and auto " \
"configuration scripts.")
#define REFERER_TEXT N_("HTTP referer value")
#define REFERER_LONGTEXT N_("Customize the HTTP referer, simulating a previous document")
...
...
@@ -134,10 +129,6 @@ vlc_module_begin ()
change_safe
()
add_bool
(
"http-forward-cookies"
,
true
,
FORWARD_COOKIES_TEXT
,
FORWARD_COOKIES_LONGTEXT
,
true
)
#ifdef WIN32
add_bool
(
"http-use-IE-proxy"
,
false
,
USE_IE_PROXY_TEXT
,
USE_IE_PROXY_LONGTEXT
,
true
)
#endif
/* 'itpc' = iTunes Podcast */
add_shortcut
(
"http"
,
"https"
,
"unsv"
,
"itpc"
,
"icyx"
)
set_callbacks
(
Open
,
Close
)
...
...
@@ -396,62 +387,51 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
#elif defined( WIN32 )
else
{
if
(
var_InheritBool
(
p_access
,
"http-use-IE-proxy"
)
)
/* Try to get the proxy server address from Windows internet settings using registry. */
HKEY
h_key
;
/* Open the key */
if
(
RegOpenKeyEx
(
HKEY_CURRENT_USER
,
"Software
\\
Microsoft"
"
\\
Windows
\\
CurrentVersion
\\
Internet Settings"
,
0
,
KEY_READ
,
&
h_key
)
==
ERROR_SUCCESS
)
{
/* Try to get the proxy server address from Windows internet settings using registry. */
HKEY
h_key
;
/* Open the key */
if
(
RegOpenKeyEx
(
HKEY_CURRENT_USER
,
"Software
\\
Microsoft"
\
"
\\
Windows
\\
CurrentVersion
\\
Internet Settings"
,
0
,
KEY_READ
,
&
h_key
)
==
ERROR_SUCCESS
)
DWORD
len
=
sizeof
(
DWORD
);
BYTE
proxyEnable
;
/* Get the proxy enable value */
if
(
RegQueryValueEx
(
h_key
,
"ProxyEnable"
,
NULL
,
NULL
,
&
proxyEnable
,
&
len
)
==
ERROR_SUCCESS
&&
proxyEnable
)
{
DWORD
i_dataReadSize
=
4
;
/* sizeof( DWORD ); */
BYTE
proxyEnable
=
0
;
/* Get the proxy enable value */
if
(
RegQueryValueEx
(
h_key
,
"ProxyEnable"
,
NULL
,
NULL
,
&
proxyEnable
,
&
i_dataReadSize
)
==
ERROR_SUCCESS
)
/* Proxy is enabled */
/* Get the proxy URL :
Proxy server value in the registry can be something like "address:port"
or "ftp=address1:port1;http=address2:port2 ..." depending of the
confirguration. */
unsigned
char
key
[
256
];
len
=
sizeof
(
key
);
if
(
RegQueryValueEx
(
h_key
,
"ProxyServer"
,
NULL
,
NULL
,
key
,
&
len
)
==
ERROR_SUCCESS
)
{
if
(
proxyEnable
)
/* FIXME: This is lame. The string should be tokenized. */
#warning FIXME.
char
*
psz_proxy
=
strstr
(
(
char
*
)
key
,
"http="
);
if
(
psz_proxy
!=
NULL
)
{
/* Proxy is enable */
char
psz_key
[
256
];
i_dataReadSize
=
256
;
if
(
RegQueryValueEx
(
h_key
,
"ProxyServer"
,
NULL
,
NULL
,
(
unsigned
char
*
)
psz_key
,
&
i_dataReadSize
)
==
ERROR_SUCCESS
)
{
/* Get the proxy URL :
Proxy server value in the registry can be something like "address:port"
or "ftp=address1:port1;http=address2:port2 ..." depending of the
confirguration. */
char
*
psz_proxy
;
psz_proxy
=
strstr
(
psz_key
,
"http="
);
if
(
psz_proxy
!=
NULL
)
{
psz_proxy
+=
strlen
(
"http="
);
char
*
psz_endUrl
=
strchr
(
psz_proxy
,
';'
);
if
(
psz_endUrl
!=
NULL
)
*
psz_endUrl
=
'\0'
;
}
else
psz_proxy
=
psz_key
;
/* Set proxy enable for this connection. */
p_sys
->
b_proxy
=
true
;
vlc_UrlParse
(
&
p_sys
->
proxy
,
psz_proxy
,
0
);
}
msg_Warn
(
p_access
,
"Couldn't read in registry "
\
"the proxy server address."
);
psz_proxy
+=
5
;
char
*
end
=
strchr
(
psz_proxy
,
';'
);
if
(
end
!=
NULL
)
*
end
=
'\0'
;
}
else
psz_proxy
=
(
char
*
)
key
;
/* Set proxy enable for this connection. */
p_sys
->
b_proxy
=
true
;
vlc_UrlParse
(
&
p_sys
->
proxy
,
psz_proxy
,
0
);
}
else
msg_Warn
(
p_access
,
"Couldn't read in registry if the "
\
"proxy is enable or not."
);
}
else
msg_Warn
(
p_access
,
"Couldn't open internet settings key "
\
"in registry."
);
msg_Dbg
(
p_access
,
"HTTP proxy disabled (MSIE)"
);
}
}
#else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment