Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d6e1e710
Commit
d6e1e710
authored
Aug 24, 2015
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Add support for WinHttpRequestOption_URLCodePage.
parent
f52ef006
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
request.c
dlls/winhttp/request.c
+25
-0
No files found.
dlls/winhttp/request.c
View file @
d6e1e710
...
...
@@ -2723,6 +2723,7 @@ struct winhttp_request
LONG
receive_timeout
;
WINHTTP_PROXY_INFO
proxy
;
BOOL
async
;
UINT
url_codepage
;
};
static
inline
struct
winhttp_request
*
impl_from_IWinHttpRequest
(
IWinHttpRequest
*
iface
)
...
...
@@ -3071,6 +3072,7 @@ static void initialize_request( struct winhttp_request *request )
request
->
connect_timeout
=
60000
;
request
->
send_timeout
=
30000
;
request
->
receive_timeout
=
30000
;
request
->
url_codepage
=
CP_UTF8
;
VariantInit
(
&
request
->
data
);
request
->
state
=
REQUEST_STATE_INITIALIZED
;
}
...
...
@@ -3091,6 +3093,7 @@ static void reset_request( struct winhttp_request *request )
request
->
bytes_read
=
0
;
request
->
error
=
ERROR_SUCCESS
;
request
->
async
=
FALSE
;
request
->
url_codepage
=
CP_UTF8
;
VariantClear
(
&
request
->
data
);
request
->
state
=
REQUEST_STATE_INITIALIZED
;
}
...
...
@@ -4021,6 +4024,28 @@ static HRESULT WINAPI winhttp_request_put_Option(
request
->
disable_feature
|=
WINHTTP_DISABLE_REDIRECTS
;
break
;
}
case
WinHttpRequestOption_URLCodePage
:
{
static
const
WCHAR
utf8W
[]
=
{
'u'
,
't'
,
'f'
,
'-'
,
'8'
,
0
};
VARIANT
cp
;
VariantInit
(
&
cp
);
hr
=
VariantChangeType
(
&
cp
,
&
value
,
0
,
VT_UI4
);
if
(
SUCCEEDED
(
hr
))
{
request
->
url_codepage
=
V_UI4
(
&
cp
);
TRACE
(
"URL codepage: %u
\n
"
,
request
->
url_codepage
);
}
else
if
(
V_VT
(
&
value
)
==
VT_BSTR
&&
!
strcmpiW
(
V_BSTR
(
&
value
),
utf8W
))
{
TRACE
(
"URL codepage: UTF-8
\n
"
);
request
->
url_codepage
=
CP_UTF8
;
hr
=
S_OK
;
}
else
FIXME
(
"URL codepage %s is not recognized
\n
"
,
debugstr_variant
(
&
value
));
break
;
}
default:
FIXME
(
"unimplemented option %u
\n
"
,
option
);
hr
=
E_NOTIMPL
;
...
...
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