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
59f1fdaf
Commit
59f1fdaf
authored
Jul 13, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Jul 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Set the channel's content type when parsing the header.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
a3d5026e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
navigate.c
dlls/mshtml/navigate.c
+19
-3
No files found.
dlls/mshtml/navigate.c
View file @
59f1fdaf
...
...
@@ -708,12 +708,29 @@ HRESULT read_stream(BSCallback *This, IStream *stream, void *buf, DWORD size, DW
static
void
parse_content_type
(
nsChannelBSC
*
This
,
const
WCHAR
*
value
)
{
const
WCHAR
*
ptr
;
size_t
len
;
const
WCHAR
*
ptr
,
*
beg
,
*
end
;
size_t
len
=
wcslen
(
value
);
char
*
content_type
;
static
const
WCHAR
charsetW
[]
=
{
'c'
,
'h'
,
'a'
,
'r'
,
's'
,
'e'
,
't'
,
'='
};
ptr
=
wcschr
(
value
,
';'
);
if
(
!
This
->
nschannel
->
content_type
||
!
(
This
->
nschannel
->
load_flags
&
LOAD_CALL_CONTENT_SNIFFERS
))
{
for
(
end
=
ptr
?
ptr
:
value
+
len
;
end
>
value
;
end
--
)
if
(
!
iswspace
(
end
[
-
1
]))
break
;
for
(
beg
=
value
;
beg
<
end
;
beg
++
)
if
(
!
iswspace
(
*
beg
))
break
;
if
((
content_type
=
heap_strndupWtoU
(
beg
,
end
-
beg
)))
{
heap_free
(
This
->
nschannel
->
content_type
);
This
->
nschannel
->
content_type
=
content_type
;
strlwr
(
content_type
);
}
}
if
(
!
ptr
)
return
;
...
...
@@ -721,7 +738,6 @@ static void parse_content_type(nsChannelBSC *This, const WCHAR *value)
while
(
*
ptr
&&
iswspace
(
*
ptr
))
ptr
++
;
len
=
lstrlenW
(
value
);
if
(
ptr
+
ARRAY_SIZE
(
charsetW
)
<
value
+
len
&&
!
wcsnicmp
(
ptr
,
charsetW
,
ARRAY_SIZE
(
charsetW
)))
{
size_t
charset_len
,
lena
;
nsACString
charset_str
;
...
...
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