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
79f11f22
Commit
79f11f22
authored
Sep 08, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/httpreq: Support HEAD request.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cbacc556
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
httprequest.c
dlls/msxml3/httprequest.c
+2
-0
httpreq.c
dlls/msxml3/tests/httpreq.c
+22
-0
No files found.
dlls/msxml3/httprequest.c
View file @
79f11f22
...
@@ -880,6 +880,7 @@ static HRESULT verify_uri(httprequest *This, IUri *uri)
...
@@ -880,6 +880,7 @@ static HRESULT verify_uri(httprequest *This, IUri *uri)
static
HRESULT
httprequest_open
(
httprequest
*
This
,
BSTR
method
,
BSTR
url
,
static
HRESULT
httprequest_open
(
httprequest
*
This
,
BSTR
method
,
BSTR
url
,
VARIANT
async
,
VARIANT
user
,
VARIANT
password
)
VARIANT
async
,
VARIANT
user
,
VARIANT
password
)
{
{
static
const
WCHAR
MethodHeadW
[]
=
{
'H'
,
'E'
,
'A'
,
'D'
,
0
};
static
const
WCHAR
MethodGetW
[]
=
{
'G'
,
'E'
,
'T'
,
0
};
static
const
WCHAR
MethodGetW
[]
=
{
'G'
,
'E'
,
'T'
,
0
};
static
const
WCHAR
MethodPutW
[]
=
{
'P'
,
'U'
,
'T'
,
0
};
static
const
WCHAR
MethodPutW
[]
=
{
'P'
,
'U'
,
'T'
,
0
};
static
const
WCHAR
MethodPostW
[]
=
{
'P'
,
'O'
,
'S'
,
'T'
,
0
};
static
const
WCHAR
MethodPostW
[]
=
{
'P'
,
'O'
,
'S'
,
'T'
,
0
};
...
@@ -915,6 +916,7 @@ static HRESULT httprequest_open(httprequest *This, BSTR method, BSTR url,
...
@@ -915,6 +916,7 @@ static HRESULT httprequest_open(httprequest *This, BSTR method, BSTR url,
This
->
verb
=
BINDVERB_POST
;
This
->
verb
=
BINDVERB_POST
;
}
}
else
if
(
!
strcmpiW
(
method
,
MethodDeleteW
)
||
else
if
(
!
strcmpiW
(
method
,
MethodDeleteW
)
||
!
strcmpiW
(
method
,
MethodHeadW
)
||
!
strcmpiW
(
method
,
MethodPropFindW
))
!
strcmpiW
(
method
,
MethodPropFindW
))
{
{
This
->
verb
=
BINDVERB_CUSTOM
;
This
->
verb
=
BINDVERB_CUSTOM
;
...
...
dlls/msxml3/tests/httpreq.c
View file @
79f11f22
...
@@ -1731,6 +1731,28 @@ static void test_XMLHTTP(void)
...
@@ -1731,6 +1731,28 @@ static void test_XMLHTTP(void)
EXPECT_HR
(
hr
,
S_OK
);
EXPECT_HR
(
hr
,
S_OK
);
IObjectWithSite_Release
(
obj_site
);
IObjectWithSite_Release
(
obj_site
);
/* HEAD request */
hr
=
IXMLHttpRequest_put_onreadystatechange
(
xhr
,
NULL
);
ok
(
hr
==
S_OK
,
"Failed to reset state change handler, hr %#x.
\n
"
,
hr
);
test_open
(
xhr
,
"HEAD"
,
xmltestA
,
S_OK
);
V_VT
(
&
varbody
)
=
VT_EMPTY
;
hr
=
IXMLHttpRequest_send
(
xhr
,
varbody
);
ok
(
hr
==
S_OK
,
"Failed to send HEAD request, hr %#x.
\n
"
,
hr
);
str
=
NULL
;
hr
=
IXMLHttpRequest_get_responseText
(
xhr
,
&
str
);
ok
(
hr
==
S_OK
,
"Failed to get response text, hr %#x.
\n
"
,
hr
);
ok
(
!*
str
,
"Unexpected text %s.
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
hr
=
IXMLHttpRequest_getAllResponseHeaders
(
xhr
,
&
str
);
ok
(
hr
==
S_OK
,
"Failed to get response headers, hr %#x.
\n
"
,
hr
);
ok
(
str
&&
*
str
,
"Expected response headers.
\n
"
);
SysFreeString
(
str
);
IXMLHttpRequest_Release
(
xhr
);
IXMLHttpRequest_Release
(
xhr
);
free_bstrs
();
free_bstrs
();
}
}
...
...
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