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
c4dd6c68
Commit
c4dd6c68
authored
Aug 09, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use moniker in AsyncOpen if channel is NULL.
parent
f1757623
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
17 deletions
+57
-17
nsio.c
dlls/mshtml/nsio.c
+57
-17
No files found.
dlls/mshtml/nsio.c
View file @
c4dd6c68
...
...
@@ -572,6 +572,9 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
nsISupports
*
aContext
)
{
nsChannel
*
This
=
NSCHANNEL_THIS
(
iface
);
BSCallback
*
bscallback
;
nsIWineURI
*
wine_uri
;
IMoniker
*
mon
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
aListener
,
aContext
);
...
...
@@ -612,31 +615,68 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
}
}
if
(
!
This
->
channel
)
{
FIXME
(
"channel == NULL
\n
"
);
if
(
This
->
channel
)
{
if
(
This
->
post_data_stream
)
{
nsIUploadChannel
*
upload_channel
;
nsres
=
nsIChannel_QueryInterface
(
This
->
channel
,
&
IID_nsIUploadChannel
,
(
void
**
)
&
upload_channel
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsACString
empty_string
;
nsACString_Init
(
&
empty_string
,
""
);
nsres
=
nsIUploadChannel_SetUploadStream
(
upload_channel
,
This
->
post_data_stream
,
&
empty_string
,
-
1
);
nsIUploadChannel_Release
(
upload_channel
);
if
(
NS_FAILED
(
nsres
))
WARN
(
"SetUploadStream failed: %08lx
\n
"
,
nsres
);
nsACString_Finish
(
&
empty_string
);
}
}
return
nsIChannel_AsyncOpen
(
This
->
channel
,
aListener
,
aContext
);
}
TRACE
(
"channel == NULL
\n
"
);
if
(
!
This
->
original_uri
)
{
ERR
(
"original_uri == NULL
\n
"
);
return
NS_ERROR_UNEXPECTED
;
}
if
(
This
->
post_data_stream
)
{
nsIUploadChannel
*
upload_channel
;
nsres
=
nsIURI_QueryInterface
(
This
->
original_uri
,
&
IID_nsIWineURI
,
(
void
**
)
&
wine_uri
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIWineURI: %08lx
\n
"
,
nsres
);
return
NS_ERROR_UNEXPECTED
;
}
nsres
=
nsIChannel_QueryInterface
(
This
->
channel
,
&
IID_nsIUploadChannel
,
(
void
**
)
&
upload_channel
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsACString
empty_string
;
nsACString_Init
(
&
empty_string
,
""
);
nsIWineURI_GetMoniker
(
wine_uri
,
&
mon
);
nsIWineURI_Release
(
wine_uri
);
if
(
!
mon
)
{
WARN
(
"mon == NULL
\n
"
);
return
NS_ERROR_UNEXPECTED
;
}
nsres
=
nsIUploadChannel_SetUploadStream
(
upload_channel
,
This
->
post_data_stream
,
&
empty_string
,
-
1
);
nsIUploadChannel_Release
(
upload_channel
);
if
(
NS_FAILED
(
nsres
))
WARN
(
"SetUploadStream failed: %08lx
\n
"
,
nsres
);
bscallback
=
create_bscallback
(
NULL
,
mon
);
IMoniker_Release
(
mon
);
nsACString_Finish
(
&
empty_string
);
}
nsIChannel_AddRef
(
NSCHANNEL
(
This
));
bscallback
->
nschannel
=
This
;
nsIStreamListener_AddRef
(
aListener
);
bscallback
->
nslistener
=
aListener
;
if
(
aContext
)
{
nsISupports_AddRef
(
aContext
);
bscallback
->
nscontext
=
aContext
;
}
return
nsIChannel_AsyncOpen
(
This
->
channel
,
aListener
,
aContext
);
start_binding
(
bscallback
);
IBindStatusCallback_Release
(
STATUSCLB
(
bscallback
));
return
NS_OK
;
}
static
nsresult
NSAPI
nsChannel_GetRequestMethod
(
nsIHttpChannel
*
iface
,
nsACString
*
aRequestMethod
)
...
...
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