Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
50c710bd
Commit
50c710bd
authored
May 15, 2014
by
Hans Leidekker
Committed by
Alexandre Julliard
May 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Add support for retrieving the proxy automatic configuration URL on Mac OS X.
parent
55222563
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
Makefile.in
dlls/winhttp/Makefile.in
+1
-1
session.c
dlls/winhttp/session.c
+47
-0
No files found.
dlls/winhttp/Makefile.in
View file @
50c710bd
...
...
@@ -2,7 +2,7 @@ MODULE = winhttp.dll
IMPORTLIB
=
winhttp
IMPORTS
=
uuid jsproxy user32 advapi32
DELAYIMPORTS
=
oleaut32 ole32 crypt32 secur32
EXTRALIBS
=
$(SOCKET_LIBS)
EXTRALIBS
=
$(
CORESERVICES_LIBS)
$(
SOCKET_LIBS)
C_SRCS
=
\
cookie.c
\
...
...
dlls/winhttp/session.c
View file @
50c710bd
...
...
@@ -23,6 +23,15 @@
#include <stdarg.h>
#include <stdlib.h>
#ifdef HAVE_CORESERVICES_CORESERVICES_H
#define GetCurrentThread MacGetCurrentThread
#define LoadResource MacLoadResource
#include <CoreServices/CoreServices.h>
#undef GetCurrentThread
#undef LoadResource
#undef DPRINTF
#endif
#include "windef.h"
#include "winbase.h"
#ifndef __MINGW32__
...
...
@@ -1286,12 +1295,42 @@ static WCHAR *build_wpad_url( const char *hostname, const struct addrinfo *ai )
return
ret
;
}
static
BOOL
get_system_proxy_autoconfig_url
(
char
*
buf
,
DWORD
buflen
)
{
#ifdef HAVE_CORESERVICES_CORESERVICES_H
CFDictionaryRef
settings
=
CFNetworkCopySystemProxySettings
();
const
void
*
ref
;
BOOL
ret
=
FALSE
;
if
(
!
settings
)
return
FALSE
;
if
(
!
(
ref
=
CFDictionaryGetValue
(
settings
,
kCFNetworkProxiesProxyAutoConfigURLString
)))
{
CFRelease
(
settings
);
return
FALSE
;
}
if
(
CFStringGetCString
(
ref
,
buf
,
buflen
,
kCFStringEncodingASCII
))
{
TRACE
(
"returning %s
\n
"
,
debugstr_a
(
buf
)
);
ret
=
TRUE
;
}
CFRelease
(
settings
);
return
ret
;
#else
FIXME
(
"no support on this platform
\n
"
);
return
FALSE
;
#endif
}
#define INTERNET_MAX_URL_LENGTH 2084
/***********************************************************************
* WinHttpDetectAutoProxyConfigUrl (winhttp.@)
*/
BOOL
WINAPI
WinHttpDetectAutoProxyConfigUrl
(
DWORD
flags
,
LPWSTR
*
url
)
{
BOOL
ret
=
FALSE
;
char
system_url
[
INTERNET_MAX_URL_LENGTH
+
1
];
TRACE
(
"0x%08x, %p
\n
"
,
flags
,
url
);
...
...
@@ -1300,6 +1339,14 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url )
set_last_error
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
get_system_proxy_autoconfig_url
(
system_url
,
sizeof
(
system_url
)
))
{
WCHAR
*
urlW
;
if
(
!
(
urlW
=
strdupAW
(
system_url
)))
return
FALSE
;
*
url
=
urlW
;
return
TRUE
;
}
if
(
flags
&
WINHTTP_AUTO_DETECT_TYPE_DHCP
)
{
static
int
fixme_shown
;
...
...
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