Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d4cff191
Commit
d4cff191
authored
Mar 11, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Improve header parsing.
parent
9d16a422
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
38 deletions
+16
-38
persist.c
dlls/mshtml/persist.c
+16
-38
No files found.
dlls/mshtml/persist.c
View file @
d4cff191
...
...
@@ -44,47 +44,27 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
static
int
fix_headers
(
char
*
buf
,
DWORD
post_len
)
{
char
*
ptr
=
NULL
;
if
(
!
strncasecmp
(
USER_AGENT
,
buf
,
sizeof
(
USER_AGENT
)
-
1
))
{
ptr
=
buf
;
}
else
{
ptr
=
strstr
(
buf
,
"
\r\n
"
USER_AGENT
);
if
(
ptr
)
ptr
+=
2
;
}
char
*
ptr
=
buf
,
*
ptr2
;
if
(
ptr
)
{
const
char
*
ptr2
;
while
(
*
ptr
&&
(
ptr
[
0
]
!=
'\r'
||
ptr
[
1
]
!=
'\n'
)
)
{
for
(
ptr2
=
ptr
+
1
;
*
ptr2
&&
(
ptr2
[
0
]
!=
'\r'
||
ptr2
[
1
]
!=
'\n'
);
ptr2
++
)
;
FIXME
(
"Ignoring User-Agent header
\n
"
);
if
(
*
ptr2
)
ptr2
+=
2
;
ptr2
=
strstr
(
ptr
,
"
\r\n
"
);
if
(
ptr2
)
if
(
!
strncasecmp
(
ptr
,
USER_AGENT
,
sizeof
(
USER_AGENT
)
-
1
))
{
FIXME
(
"Ignoring User-Agent header
\n
"
);
memmove
(
ptr
,
ptr2
,
strlen
(
ptr2
)
+
1
);
}
if
(
!
post_len
)
{
if
(
!
strncasecmp
(
CONTENT_TYPE
,
buf
,
sizeof
(
CONTENT_TYPE
)
-
1
))
{
ptr
=
buf
;
}
else
{
ptr
=
strstr
(
buf
,
"
\r\n
"
CONTENT_TYPE
);
if
(
ptr
)
ptr
+=
2
;
}
if
(
ptr
)
{
const
char
*
ptr2
;
}
else
if
(
!
post_len
&&
!
strncasecmp
(
ptr
,
CONTENT_TYPE
,
sizeof
(
CONTENT_TYPE
)
-
1
))
{
TRACE
(
"Ignoring Content-Type header
\n
"
);
ptr2
=
strstr
(
ptr
,
"
\r\n
"
);
if
(
ptr2
)
memmove
(
ptr
,
ptr2
,
strlen
(
ptr2
)
+
1
);
memmove
(
ptr
,
ptr2
,
strlen
(
ptr2
)
+
1
);
}
else
{
ptr
=
ptr2
;
}
}
return
strlen
(
buf
);
*
ptr
=
0
;
return
ptr
-
buf
;
}
static
nsIInputStream
*
get_post_data_stream
(
IBindCtx
*
bctx
)
...
...
@@ -159,18 +139,16 @@ static nsIInputStream *get_post_data_stream(IBindCtx *bctx)
}
if
(
post_len
)
{
if
(
len
>=
4
&&
!
strcmp
(
data
+
len
-
4
,
"
\r\n\r\n
"
))
len
-=
2
;
sprintf
(
data
+
len
,
content_length
,
post_len
);
len
=
strlen
(
data
);
len
+=
strlen
(
data
+
len
);
memcpy
(
data
+
len
,
bindinfo
.
stgmedData
.
u
.
hGlobal
,
post_len
);
}
TRACE
(
"data = %s
\n
"
,
debugstr_an
(
data
,
len
+
post_len
));
ret
=
create_nsstream
(
data
,
len
+
post_len
);
if
(
len
)
ret
=
create_nsstream
(
data
,
len
+
post_len
);
}
CoTaskMemFree
(
headers
);
...
...
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