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
7e7b2a3f
Commit
7e7b2a3f
authored
Oct 04, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implemented ::get_status().
parent
1441dc94
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
6 deletions
+40
-6
httprequest.c
dlls/msxml3/httprequest.c
+15
-5
domdoc.c
dlls/msxml3/tests/domdoc.c
+25
-1
No files found.
dlls/msxml3/httprequest.c
View file @
7e7b2a3f
...
...
@@ -2,6 +2,7 @@
* IXMLHTTPRequest implementation
*
* Copyright 2008 Alistair Leslie-Hughes
* Copyright 2010 Nikolay Sivov for Codeweavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -74,6 +75,7 @@ typedef struct
/* bind callback */
BindStatusCallback
*
bsc
;
LONG
status
;
}
httprequest
;
static
inline
httprequest
*
impl_from_IXMLHTTPRequest
(
IXMLHTTPRequest
*
iface
)
...
...
@@ -88,7 +90,7 @@ struct BindStatusCallback
LONG
ref
;
IBinding
*
binding
;
const
httprequest
*
request
;
httprequest
*
request
;
};
static
inline
BindStatusCallback
*
impl_from_IBindStatusCallback
(
IBindStatusCallback
*
iface
)
...
...
@@ -349,6 +351,8 @@ static HRESULT WINAPI BSCHttpNegotiate_OnResponse(IHttpNegotiate *iface, DWORD c
TRACE
(
"(%p)->(%d %s %s %p)
\n
"
,
This
,
code
,
debugstr_w
(
resp_headers
),
debugstr_w
(
req_headers
),
add_reqheaders
);
This
->
request
->
status
=
code
;
return
S_OK
;
}
...
...
@@ -362,7 +366,7 @@ static const IHttpNegotiateVtbl BSCHttpNegotiateVtbl = {
BSCHttpNegotiate_OnResponse
};
static
HRESULT
BindStatusCallback_create
(
const
httprequest
*
This
,
BindStatusCallback
**
obj
)
static
HRESULT
BindStatusCallback_create
(
httprequest
*
This
,
BindStatusCallback
**
obj
)
{
BindStatusCallback
*
bsc
;
IBindCtx
*
pbc
;
...
...
@@ -693,13 +697,18 @@ static HRESULT WINAPI httprequest_abort(IXMLHTTPRequest *iface)
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
httprequest_get_status
(
IXMLHTTPRequest
*
iface
,
LONG
*
plS
tatus
)
static
HRESULT
WINAPI
httprequest_get_status
(
IXMLHTTPRequest
*
iface
,
LONG
*
s
tatus
)
{
httprequest
*
This
=
impl_from_IXMLHTTPRequest
(
iface
);
FIXME
(
"stub %p %p
\n
"
,
This
,
plS
tatus
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
s
tatus
);
return
E_NOTIMPL
;
if
(
!
status
)
return
E_INVALIDARG
;
if
(
This
->
state
!=
READYSTATE_COMPLETE
)
return
E_FAIL
;
*
status
=
This
->
status
;
return
S_OK
;
}
static
HRESULT
WINAPI
httprequest_get_statusText
(
IXMLHTTPRequest
*
iface
,
BSTR
*
pbstrStatus
)
...
...
@@ -812,6 +821,7 @@ HRESULT XMLHTTPRequest_create(IUnknown *pUnkOuter, void **ppObj)
req
->
url
=
req
->
user
=
req
->
password
=
NULL
;
req
->
state
=
READYSTATE_UNINITIALIZED
;
req
->
bsc
=
NULL
;
req
->
status
=
0
;
req
->
reqheader_size
=
0
;
list_init
(
&
req
->
reqheaders
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
7e7b2a3f
...
...
@@ -3082,7 +3082,7 @@ static void test_XMLHTTP(void)
VARIANT
dummy
;
VARIANT
async
;
VARIANT
varbody
;
LONG
state
;
LONG
state
,
status
;
HRESULT
hr
=
CoCreateInstance
(
&
CLSID_XMLHTTPRequest
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IXMLHttpRequest
,
(
void
**
)
&
pXMLHttpRequest
);
...
...
@@ -3108,6 +3108,15 @@ static void test_XMLHTTP(void)
hr
=
IXMLHttpRequest_send
(
pXMLHttpRequest
,
dummy
);
ok
(
hr
==
E_FAIL
||
broken
(
hr
==
E_UNEXPECTED
)
/* win9x, win2k */
,
"got 0x%08x
\n
"
,
hr
);
/* initial status code */
hr
=
IXMLHttpRequest_get_status
(
pXMLHttpRequest
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
status
=
0xdeadbeef
;
hr
=
IXMLHttpRequest_get_status
(
pXMLHttpRequest
,
&
status
);
ok
(
hr
==
E_FAIL
||
broken
(
hr
==
E_UNEXPECTED
)
/* win9x, win2k */
,
"got 0x%08x
\n
"
,
hr
);
ok
(
status
==
0xdeadbeef
,
"got %d
\n
"
,
status
);
/* invalid parameters */
hr
=
IXMLHttpRequest_open
(
pXMLHttpRequest
,
NULL
,
NULL
,
async
,
dummy
,
dummy
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -3141,6 +3150,12 @@ static void test_XMLHTTP(void)
hr
=
IXMLHttpRequest_open
(
pXMLHttpRequest
,
method
,
url
,
async
,
dummy
,
dummy
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
/* status code after ::open() */
status
=
0xdeadbeef
;
hr
=
IXMLHttpRequest_get_status
(
pXMLHttpRequest
,
&
status
);
ok
(
hr
==
E_FAIL
||
broken
(
hr
==
E_UNEXPECTED
)
/* win9x, win2k */
,
"got 0x%08x
\n
"
,
hr
);
ok
(
status
==
0xdeadbeef
,
"got %d
\n
"
,
status
);
state
=
-
1
;
hr
=
IXMLHttpRequest_get_readyState
(
pXMLHttpRequest
,
&
state
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -3167,6 +3182,15 @@ static void test_XMLHTTP(void)
}
todo_wine
ok
(
hr
==
S_OK
,
"IXMLHttpRequest_send should have succeeded instead of failing with 0x%08x
\n
"
,
hr
);
/* status code after ::send() */
status
=
0xdeadbeef
;
hr
=
IXMLHttpRequest_get_status
(
pXMLHttpRequest
,
&
status
);
todo_wine
{
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
status
==
200
,
"got %d
\n
"
,
status
);
}
/* another ::send() after completed request */
hr
=
IXMLHttpRequest_send
(
pXMLHttpRequest
,
varbody
);
ok
(
hr
==
E_FAIL
||
broken
(
hr
==
E_UNEXPECTED
)
/* win9x, win2k */
,
"got 0x%08x
\n
"
,
hr
);
...
...
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