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
216ad43f
Commit
216ad43f
authored
Feb 26, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use HttpQueryInfoA in IWinInetHttpInfo::QueryInfo implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a067ceb5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
20 deletions
+39
-20
http.c
dlls/urlmon/http.c
+3
-5
protocol.c
dlls/urlmon/tests/protocol.c
+36
-15
No files found.
dlls/urlmon/http.c
View file @
216ad43f
...
@@ -912,11 +912,9 @@ static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption
...
@@ -912,11 +912,9 @@ static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption
if
(
!
This
->
base
.
request
)
if
(
!
This
->
base
.
request
)
return
E_FAIL
;
return
E_FAIL
;
if
(
!
HttpQueryInfoW
(
This
->
base
.
request
,
dwOption
,
pBuffer
,
pcbBuffer
,
pdwFlags
))
{
if
(
!
HttpQueryInfoA
(
This
->
base
.
request
,
dwOption
,
pBuffer
,
pcbBuffer
,
pdwFlags
))
if
(
pBuffer
)
return
S_FALSE
;
memset
(
pBuffer
,
0
,
*
pcbBuffer
);
return
S_OK
;
}
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/urlmon/tests/protocol.c
View file @
216ad43f
...
@@ -940,6 +940,39 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
...
@@ -940,6 +940,39 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
return
S_OK
;
return
S_OK
;
}
}
static
void
test_http_info
(
IInternetProtocol
*
protocol
)
{
IWinInetHttpInfo
*
info
;
char
buf
[
1024
];
DWORD
size
,
len
;
HRESULT
hres
;
static
const
WCHAR
connectionW
[]
=
{
'c'
,
'o'
,
'n'
,
'n'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
hres
=
IInternetProtocol_QueryInterface
(
protocol
,
&
IID_IWinInetHttpInfo
,
(
void
**
)
&
info
);
ok
(
hres
==
S_OK
,
"Could not get IWinInterHttpInfo iface: %08x
\n
"
,
hres
);
size
=
sizeof
(
buf
);
strcpy
(
buf
,
"connection"
);
hres
=
IWinInetHttpInfo_QueryInfo
(
info
,
HTTP_QUERY_CUSTOM
,
buf
,
&
size
,
NULL
,
NULL
);
if
(
tested_protocol
!=
FTP_TEST
)
{
ok
(
hres
==
S_OK
,
"QueryInfo failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp
(
buf
,
"Keep-Alive"
),
"buf = %s
\n
"
,
buf
);
len
=
strlen
(
buf
);
ok
(
size
==
len
,
"size = %u, expected %u
\n
"
,
size
,
len
);
size
=
sizeof
(
buf
);
memcpy
(
buf
,
connectionW
,
sizeof
(
connectionW
));
hres
=
IWinInetHttpInfo_QueryInfo
(
info
,
HTTP_QUERY_CUSTOM
,
buf
,
&
size
,
NULL
,
NULL
);
ok
(
hres
==
S_FALSE
,
"QueryInfo returned %08x
\n
"
,
hres
);
}
else
{
ok
(
hres
==
S_FALSE
,
"QueryInfo failed: %08x
\n
"
,
hres
);
}
IWinInetHttpInfo_Release
(
info
);
}
static
HRESULT
WINAPI
ProtocolSink_ReportData
(
IInternetProtocolSink
*
iface
,
DWORD
grfBSCF
,
static
HRESULT
WINAPI
ProtocolSink_ReportData
(
IInternetProtocolSink
*
iface
,
DWORD
grfBSCF
,
ULONG
ulProgress
,
ULONG
ulProgressMax
)
ULONG
ulProgress
,
ULONG
ulProgressMax
)
{
{
...
@@ -1071,6 +1104,9 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
...
@@ -1071,6 +1104,9 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
"grcfBSCF = %08x
\n
"
,
grfBSCF
);
"grcfBSCF = %08x
\n
"
,
grfBSCF
);
}
}
if
((
grfBSCF
&
BSCF_FIRSTDATANOTIFICATION
)
&&
!
binding_test
)
test_http_info
(
async_protocol
);
if
(
!
(
bindf
&
BINDF_FROMURLMON
)
&&
if
(
!
(
bindf
&
BINDF_FROMURLMON
)
&&
!
(
grfBSCF
&
BSCF_LASTDATANOTIFICATION
))
{
!
(
grfBSCF
&
BSCF_LASTDATANOTIFICATION
))
{
if
(
state
==
STATE_CONNECTING
)
{
if
(
state
==
STATE_CONNECTING
)
{
...
@@ -3129,19 +3165,6 @@ static void test_protocol_terminate(IInternetProtocol *protocol)
...
@@ -3129,19 +3165,6 @@ static void test_protocol_terminate(IInternetProtocol *protocol)
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08x
\n
"
,
hres
);
}
}
static
void
test_http_info
(
IInternetProtocol
*
protocol
)
{
IWinInetHttpInfo
*
info
;
HRESULT
hres
;
hres
=
IInternetProtocol_QueryInterface
(
protocol
,
&
IID_IWinInetHttpInfo
,
(
void
**
)
&
info
);
ok
(
hres
==
S_OK
,
"Could not get IWinInterHttpInfo iface: %08x
\n
"
,
hres
);
/* TODO */
IWinInetHttpInfo_Release
(
info
);
}
/* is_first refers to whether this is the first call to this function
/* is_first refers to whether this is the first call to this function
* _for this url_ */
* _for this url_ */
static
void
test_http_protocol_url
(
LPCWSTR
url
,
int
prot
,
DWORD
flags
,
DWORD
tymed
)
static
void
test_http_protocol_url
(
LPCWSTR
url
,
int
prot
,
DWORD
flags
,
DWORD
tymed
)
...
@@ -3183,7 +3206,6 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym
...
@@ -3183,7 +3206,6 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym
ULONG
ref
;
ULONG
ref
;
test_priority
(
async_protocol
);
test_priority
(
async_protocol
);
test_http_info
(
async_protocol
);
SET_EXPECT
(
ReportProgress_COOKIE_SENT
);
SET_EXPECT
(
ReportProgress_COOKIE_SENT
);
if
(
http_is_first
)
{
if
(
http_is_first
)
{
...
@@ -3452,7 +3474,6 @@ static void test_ftp_protocol(void)
...
@@ -3452,7 +3474,6 @@ static void test_ftp_protocol(void)
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08x
\n
"
,
hres
);
test_priority
(
async_protocol
);
test_priority
(
async_protocol
);
test_http_info
(
async_protocol
);
SET_EXPECT
(
GetBindInfo
);
SET_EXPECT
(
GetBindInfo
);
SET_EXPECT
(
ReportProgress_FINDINGRESOURCE
);
SET_EXPECT
(
ReportProgress_FINDINGRESOURCE
);
...
...
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