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
0085383f
Commit
0085383f
authored
Aug 03, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store request method in nsChannel.
parent
dc825296
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
mshtml_private.h
dlls/mshtml/mshtml_private.h
+8
-0
nsio.c
dlls/mshtml/nsio.c
+18
-3
No files found.
dlls/mshtml/mshtml_private.h
View file @
0085383f
...
...
@@ -446,6 +446,13 @@ typedef struct nsWineURI nsWineURI;
HRESULT
set_wine_url
(
nsWineURI
*
,
LPCWSTR
);
nsresult
on_start_uri_open
(
NSContainer
*
,
nsIURI
*
,
PRBool
*
);
/* Keep sync with request_method_strings in nsio.c */
typedef
enum
{
METHOD_GET
,
METHOD_PUT
,
METHOD_POST
}
REQUEST_METHOD
;
typedef
struct
{
const
nsIHttpChannelVtbl
*
lpHttpChannelVtbl
;
const
nsIUploadChannelVtbl
*
lpUploadChannelVtbl
;
...
...
@@ -463,6 +470,7 @@ typedef struct {
char
*
content_type
;
char
*
charset
;
PRUint32
response_status
;
REQUEST_METHOD
request_method
;
struct
list
response_headers
;
struct
list
request_headers
;
UINT
url_scheme
;
...
...
dlls/mshtml/nsio.c
View file @
0085383f
/*
* Copyright 2006-20
07
Jacek Caban for CodeWeavers
* Copyright 2006-20
10
Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -51,6 +51,8 @@ static nsINetUtil *net_util;
static
const
WCHAR
about_blankW
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
0
};
static
const
char
*
request_method_strings
[]
=
{
"GET"
,
"PUT"
,
"POST"
};
struct
nsWineURI
{
const
nsIURLVtbl
*
lpIURLVtbl
;
...
...
@@ -1048,10 +1050,21 @@ static nsresult NSAPI nsChannel_SetRequestMethod(nsIHttpChannel *iface,
const
nsACString
*
aRequestMethod
)
{
nsChannel
*
This
=
NSCHANNEL_THIS
(
iface
);
const
char
*
method
;
unsigned
i
;
TRACE
(
"(%p)->(%s)
: Returning NS_OK
\n
"
,
This
,
debugstr_nsacstr
(
aRequestMethod
));
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_nsacstr
(
aRequestMethod
));
return
NS_OK
;
nsACString_GetData
(
aRequestMethod
,
&
method
);
for
(
i
=
0
;
i
<
sizeof
(
request_method_strings
)
/
sizeof
(
*
request_method_strings
);
i
++
)
{
if
(
!
strcasecmp
(
method
,
request_method_strings
[
i
]))
{
This
->
request_method
=
i
;
return
NS_OK
;
}
}
ERR
(
"Invalid method %s
\n
"
,
debugstr_a
(
method
));
return
NS_ERROR_UNEXPECTED
;
}
static
nsresult
NSAPI
nsChannel_GetReferrer
(
nsIHttpChannel
*
iface
,
nsIURI
**
aReferrer
)
...
...
@@ -1329,6 +1342,7 @@ static nsresult NSAPI nsUploadChannel_SetUploadStream(nsIUploadChannel *iface,
if
(
aStream
)
nsIInputStream_AddRef
(
aStream
);
This
->
request_method
=
METHOD_POST
;
return
NS_OK
;
}
...
...
@@ -2640,6 +2654,7 @@ static nsresult NSAPI nsIOService_NewChannelFromURI(nsIIOService *iface, nsIURI
ret
->
lpIHttpChannelInternalVtbl
=
&
nsHttpChannelInternalVtbl
;
ret
->
ref
=
1
;
ret
->
uri
=
wine_uri
;
ret
->
request_method
=
METHOD_GET
;
list_init
(
&
ret
->
response_headers
);
list_init
(
&
ret
->
request_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