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
8d11858e
Commit
8d11858e
authored
Oct 27, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Get rid of no longer needed parse_post_data.
parent
ea99533e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
94 deletions
+6
-94
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-1
navigate.c
dlls/mshtml/navigate.c
+6
-91
nsio.c
dlls/mshtml/nsio.c
+0
-2
No files found.
dlls/mshtml/mshtml_private.h
View file @
8d11858e
...
...
@@ -470,7 +470,6 @@ typedef struct {
nsWineURI
*
uri
;
nsIInputStream
*
post_data_stream
;
BOOL
parse_stream
;
nsILoadGroup
*
load_group
;
nsIInterfaceRequestor
*
notif_callback
;
nsISupports
*
owner
;
...
...
dlls/mshtml/navigate.c
View file @
8d11858e
...
...
@@ -706,77 +706,6 @@ static HRESULT read_post_data_stream(nsIInputStream *stream, HGLOBAL *post_data,
return
S_OK
;
}
static
void
parse_post_data
(
nsIInputStream
*
post_data_stream
,
LPWSTR
*
headers_ret
,
HGLOBAL
*
post_data_ret
,
ULONG
*
post_data_len_ret
)
{
ULONG
post_data_len
;
HGLOBAL
post_data
=
NULL
;
LPWSTR
headers
=
NULL
;
DWORD
headers_len
=
0
,
len
;
const
char
*
ptr
,
*
ptr2
,
*
post_data_end
;
HRESULT
hres
;
hres
=
read_post_data_stream
(
post_data_stream
,
&
post_data
,
&
post_data_len
);
if
(
FAILED
(
hres
))
{
FIXME
(
"read_post_data_stream failed: %08x
\n
"
,
hres
);
return
;
}
ptr
=
ptr2
=
post_data
;
post_data_end
=
(
const
char
*
)
post_data
+
post_data_len
;
while
(
ptr
<
post_data_end
&&
(
*
ptr
!=
'\r'
||
ptr
[
1
]
!=
'\n'
))
{
while
(
ptr
<
post_data_end
&&
(
*
ptr
!=
'\r'
||
ptr
[
1
]
!=
'\n'
))
ptr
++
;
if
(
!*
ptr
)
{
FIXME
(
"*ptr = 0
\n
"
);
return
;
}
ptr
+=
2
;
if
(
ptr
-
ptr2
>=
sizeof
(
CONTENT_LENGTH
)
&&
CompareStringA
(
LOCALE_SYSTEM_DEFAULT
,
NORM_IGNORECASE
,
CONTENT_LENGTH
,
sizeof
(
CONTENT_LENGTH
)
-
1
,
ptr2
,
sizeof
(
CONTENT_LENGTH
)
-
1
)
==
CSTR_EQUAL
)
{
ptr2
=
ptr
;
continue
;
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ptr2
,
ptr
-
ptr2
,
NULL
,
0
);
if
(
headers
)
headers
=
heap_realloc
(
headers
,(
headers_len
+
len
+
1
)
*
sizeof
(
WCHAR
));
else
headers
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ptr2
,
ptr
-
ptr2
,
headers
+
headers_len
,
len
);
headers_len
+=
len
;
ptr2
=
ptr
;
}
headers
[
headers_len
]
=
0
;
*
headers_ret
=
headers
;
if
(
ptr
>=
post_data_end
-
2
)
{
GlobalFree
(
post_data
);
return
;
}
ptr
+=
2
;
if
(
headers_len
)
{
post_data_len
-=
ptr
-
(
const
char
*
)
post_data
;
memmove
(
post_data
,
ptr
,
post_data_len
);
post_data
=
GlobalReAlloc
(
post_data
,
post_data_len
+
1
,
0
);
}
*
post_data_ret
=
post_data
;
*
post_data_len_ret
=
post_data_len
;
}
HRESULT
start_binding
(
HTMLWindow
*
window
,
HTMLDocumentNode
*
doc
,
BSCallback
*
bscallback
,
IBindCtx
*
bctx
)
{
IStream
*
str
=
NULL
;
...
...
@@ -1129,22 +1058,10 @@ static HRESULT nsChannelBSC_init_bindinfo(BSCallback *bsc)
HRESULT
hres
;
if
(
This
->
nschannel
&&
This
->
nschannel
->
post_data_stream
)
{
if
(
This
->
nschannel
->
parse_stream
)
{
WCHAR
*
headers
;
parse_post_data
(
This
->
nschannel
->
post_data_stream
,
&
headers
,
&
This
->
bsc
.
post_data
,
&
This
->
bsc
.
post_data_len
);
hres
=
parse_headers
(
headers
,
&
This
->
nschannel
->
request_headers
);
heap_free
(
headers
);
if
(
FAILED
(
hres
))
return
hres
;
}
else
{
hres
=
read_post_data_stream
(
This
->
nschannel
->
post_data_stream
,
&
This
->
bsc
.
post_data
,
&
This
->
bsc
.
post_data_len
);
if
(
FAILED
(
hres
))
return
hres
;
}
hres
=
read_post_data_stream
(
This
->
nschannel
->
post_data_stream
,
&
This
->
bsc
.
post_data
,
&
This
->
bsc
.
post_data_len
);
if
(
FAILED
(
hres
))
return
hres
;
TRACE
(
"post_data = %s
\n
"
,
debugstr_an
(
This
->
bsc
.
post_data
,
This
->
bsc
.
post_data_len
));
}
...
...
@@ -1491,10 +1408,8 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url,
}
if
(
post_data_stream
)
{
parse_post_data
(
post_data_stream
,
&
callback
->
bsc
.
headers
,
&
callback
->
bsc
.
post_data
,
&
callback
->
bsc
.
post_data_len
);
TRACE
(
"headers = %s post_data = %s
\n
"
,
debugstr_w
(
callback
->
bsc
.
headers
),
debugstr_an
(
callback
->
bsc
.
post_data
,
callback
->
bsc
.
post_data_len
));
read_post_data_stream
(
post_data_stream
,
&
callback
->
bsc
.
post_data
,
&
callback
->
bsc
.
post_data_len
);
TRACE
(
"post_data = %s
\n
"
,
debugstr_an
(
callback
->
bsc
.
post_data
,
callback
->
bsc
.
post_data_len
));
}
hres
=
CreateAsyncBindCtx
(
0
,
STATUSCLB
(
&
callback
->
bsc
),
NULL
,
&
bindctx
);
...
...
dlls/mshtml/nsio.c
View file @
8d11858e
...
...
@@ -1353,7 +1353,6 @@ static nsresult NSAPI nsUploadChannel_SetUploadStream(nsIUploadChannel *iface,
TRACE
(
"(%p)->(%p %s %d)
\n
"
,
This
,
aStream
,
debugstr_nsacstr
(
aContentType
),
aContentLength
);
This
->
parse_stream
=
TRUE
;
if
(
aContentType
)
{
nsACString_GetData
(
aContentType
,
&
content_type
);
if
(
*
content_type
)
{
...
...
@@ -1366,7 +1365,6 @@ static nsresult NSAPI nsUploadChannel_SetUploadStream(nsIUploadChannel *iface,
set_http_header
(
&
This
->
request_headers
,
content_typeW
,
sizeof
(
content_typeW
)
/
sizeof
(
WCHAR
),
ct
,
strlenW
(
ct
));
heap_free
(
ct
);
This
->
parse_stream
=
FALSE
;
}
}
...
...
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