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
4e6e9a14
Commit
4e6e9a14
authored
Jul 22, 2015
by
Zhenbo Li
Committed by
Alexandre Julliard
Jul 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add nsChannel_GetResponseStatusText implementation.
parent
21043e5a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
2 deletions
+49
-2
binding.h
dlls/mshtml/binding.h
+1
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+17
-0
navigate.c
dlls/mshtml/navigate.c
+28
-0
nsio.c
dlls/mshtml/nsio.c
+3
-2
No files found.
dlls/mshtml/binding.h
View file @
4e6e9a14
...
...
@@ -51,6 +51,7 @@ typedef struct {
char
*
content_type
;
char
*
charset
;
UINT32
response_status
;
char
*
response_status_text
;
REQUEST_METHOD
request_method
;
struct
list
response_headers
;
struct
list
request_headers
;
...
...
dlls/mshtml/mshtml_private.h
View file @
4e6e9a14
...
...
@@ -1230,6 +1230,23 @@ static inline char *heap_strdupWtoU(const WCHAR *str)
return
ret
;
}
static
inline
char
*
heap_strndupWtoU
(
LPCWSTR
str
,
unsigned
len
)
{
char
*
ret
=
NULL
;
DWORD
size
;
if
(
str
&&
len
)
{
size
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
str
,
len
,
NULL
,
0
,
NULL
,
NULL
);
ret
=
heap_alloc
(
size
+
1
);
if
(
ret
)
{
WideCharToMultiByte
(
CP_UTF8
,
0
,
str
,
len
,
ret
,
size
,
NULL
,
NULL
);
ret
[
size
]
=
'\0'
;
}
}
return
ret
;
}
static
inline
void
windowref_addref
(
windowref_t
*
ref
)
{
InterlockedIncrement
(
&
ref
->
ref
);
...
...
dlls/mshtml/navigate.c
View file @
4e6e9a14
...
...
@@ -1595,10 +1595,29 @@ static HRESULT nsChannelBSC_on_progress(BSCallback *bsc, ULONG status_code, LPCW
return
S_OK
;
}
static
HRESULT
process_response_status_text
(
const
WCHAR
*
header
,
const
WCHAR
*
header_end
,
char
**
status_text
)
{
header
=
strchrW
(
header
+
1
,
' '
);
if
(
!
header
||
header
>=
header_end
)
return
E_FAIL
;
header
=
strchrW
(
header
+
1
,
' '
);
if
(
!
header
||
header
>=
header_end
)
return
E_FAIL
;
++
header
;
*
status_text
=
heap_strndupWtoU
(
header
,
header_end
-
header
);
if
(
!*
status_text
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
static
HRESULT
nsChannelBSC_on_response
(
BSCallback
*
bsc
,
DWORD
response_code
,
LPCWSTR
response_headers
)
{
nsChannelBSC
*
This
=
nsChannelBSC_from_BSCallback
(
bsc
);
char
*
str
;
HRESULT
hres
;
This
->
response_processed
=
TRUE
;
...
...
@@ -1608,6 +1627,15 @@ static HRESULT nsChannelBSC_on_response(BSCallback *bsc, DWORD response_code,
const
WCHAR
*
headers
;
headers
=
strchrW
(
response_headers
,
'\r'
);
hres
=
process_response_status_text
(
response_headers
,
headers
,
&
str
);
if
(
FAILED
(
hres
))
{
WARN
(
"parsing headers failed: %08x
\n
"
,
hres
);
return
hres
;
}
heap_free
(
This
->
nschannel
->
response_status_text
);
This
->
nschannel
->
response_status_text
=
str
;
if
(
headers
&&
headers
[
1
]
==
'\n'
)
{
headers
+=
2
;
hres
=
process_response_headers
(
This
,
headers
);
...
...
dlls/mshtml/nsio.c
View file @
4e6e9a14
...
...
@@ -1394,9 +1394,10 @@ static nsresult NSAPI nsChannel_GetResponseStatusText(nsIHttpChannel *iface,
{
nsChannel
*
This
=
impl_from_nsIHttpChannel
(
iface
);
FIXM
E
(
"(%p)->(%p)
\n
"
,
This
,
aResponseStatusText
);
TRAC
E
(
"(%p)->(%p)
\n
"
,
This
,
aResponseStatusText
);
return
NS_ERROR_NOT_IMPLEMENTED
;
nsACString_SetData
(
aResponseStatusText
,
This
->
response_status_text
);
return
NS_OK
;
}
static
nsresult
NSAPI
nsChannel_GetRequestSucceeded
(
nsIHttpChannel
*
iface
,
...
...
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