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
2d1bc5b8
Commit
2d1bc5b8
authored
May 26, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
May 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Avoid LPWSTR to LPCWSTR cast.
parent
dd61ebe6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
http.c
dlls/urlmon/http.c
+18
-19
No files found.
dlls/urlmon/http.c
View file @
2d1bc5b8
...
@@ -36,7 +36,7 @@ typedef struct {
...
@@ -36,7 +36,7 @@ typedef struct {
BOOL
https
;
BOOL
https
;
IHttpNegotiate
*
http_negotiate
;
IHttpNegotiate
*
http_negotiate
;
LPWSTR
full_header
;
WCHAR
*
full_header
;
LONG
ref
;
LONG
ref
;
}
HttpProtocol
;
}
HttpProtocol
;
...
@@ -56,9 +56,8 @@ static inline HttpProtocol *impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface)
...
@@ -56,9 +56,8 @@ static inline HttpProtocol *impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface)
return
CONTAINING_RECORD
(
iface
,
HttpProtocol
,
IWinInetHttpInfo_iface
);
return
CONTAINING_RECORD
(
iface
,
HttpProtocol
,
IWinInetHttpInfo_iface
);
}
}
/* Default headers from native */
static
const
WCHAR
default_headersW
[]
=
{
static
const
WCHAR
wszHeaders
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
'-'
,
'E'
,
'n'
,
'c'
,
'o'
,
'd'
,
'i'
,
'n'
,
'g'
,
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
'-'
,
'E'
,
'n'
,
'c'
,
'o'
,
'd'
,
'i'
,
'n'
,
'g'
,
':'
,
' '
,
'g'
,
'z'
,
'i'
,
'p'
,
','
,
' '
,
'd'
,
'e'
,
'f'
,
'l'
,
'a'
,
't'
,
'e'
,
0
};
':'
,
' '
,
'g'
,
'z'
,
'i'
,
'p'
,
','
,
' '
,
'd'
,
'e'
,
'f'
,
'l'
,
'a'
,
't'
,
'e'
,
0
};
static
LPWSTR
query_http_info
(
HttpProtocol
*
This
,
DWORD
option
)
static
LPWSTR
query_http_info
(
HttpProtocol
*
This
,
DWORD
option
)
{
{
...
@@ -277,7 +276,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
...
@@ -277,7 +276,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
LPOLESTR
accept_mimes
[
257
];
LPOLESTR
accept_mimes
[
257
];
const
WCHAR
**
accept_types
;
const
WCHAR
**
accept_types
;
BYTE
security_id
[
512
];
BYTE
security_id
[
512
];
DWORD
len
=
0
,
port
;
DWORD
len
,
port
;
ULONG
num
,
error
;
ULONG
num
,
error
;
BOOL
res
,
b
;
BOOL
res
,
b
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -371,7 +370,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
...
@@ -371,7 +370,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
return
hres
;
return
hres
;
}
}
hres
=
IHttpNegotiate_BeginningTransaction
(
This
->
http_negotiate
,
url
,
wszHeaders
,
hres
=
IHttpNegotiate_BeginningTransaction
(
This
->
http_negotiate
,
url
,
default_headersW
,
0
,
&
addl_header
);
0
,
&
addl_header
);
SysFreeString
(
url
);
SysFreeString
(
url
);
if
(
hres
!=
S_OK
)
{
if
(
hres
!=
S_OK
)
{
...
@@ -380,18 +379,19 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
...
@@ -380,18 +379,19 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
return
hres
;
return
hres
;
}
}
if
(
addl_header
)
{
len
=
addl_header
?
strlenW
(
addl_header
)
:
0
;
int
len_addl_header
=
strlenW
(
addl_header
);
This
->
full_header
=
heap_alloc
(
len_addl_header
*
sizeof
(
WCHAR
)
+
sizeof
(
wszHeaders
));
This
->
full_header
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
+
sizeof
(
default_headersW
));
if
(
!
This
->
full_header
)
{
lstrcpyW
(
This
->
full_header
,
addl_header
);
IServiceProvider_Release
(
service_provider
);
lstrcpyW
(
&
This
->
full_header
[
len_addl_header
],
wszHeaders
);
return
E_OUTOFMEMORY
;
CoTaskMemFree
(
addl_header
);
}
else
{
This
->
full_header
=
(
LPWSTR
)
wszHeaders
;
}
}
if
(
len
)
memcpy
(
This
->
full_header
,
addl_header
,
len
*
sizeof
(
WCHAR
));
CoTaskMemFree
(
addl_header
);
memcpy
(
This
->
full_header
+
len
,
default_headersW
,
sizeof
(
default_headersW
));
hres
=
IServiceProvider_QueryService
(
service_provider
,
&
IID_IHttpNegotiate2
,
hres
=
IServiceProvider_QueryService
(
service_provider
,
&
IID_IHttpNegotiate2
,
&
IID_IHttpNegotiate2
,
(
void
**
)
&
http_negotiate2
);
&
IID_IHttpNegotiate2
,
(
void
**
)
&
http_negotiate2
);
IServiceProvider_Release
(
service_provider
);
IServiceProvider_Release
(
service_provider
);
...
@@ -525,13 +525,12 @@ static void HttpProtocol_close_connection(Protocol *prot)
...
@@ -525,13 +525,12 @@ static void HttpProtocol_close_connection(Protocol *prot)
if
(
This
->
http_negotiate
)
{
if
(
This
->
http_negotiate
)
{
IHttpNegotiate_Release
(
This
->
http_negotiate
);
IHttpNegotiate_Release
(
This
->
http_negotiate
);
This
->
http_negotiate
=
0
;
This
->
http_negotiate
=
NULL
;
}
}
if
(
This
->
full_header
)
{
if
(
This
->
full_header
)
{
if
(
This
->
full_header
!=
wszHeaders
)
heap_free
(
This
->
full_header
);
heap_free
(
This
->
full_header
);
This
->
full_header
=
NULL
;
This
->
full_header
=
0
;
}
}
}
}
...
...
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