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
e34cb913
Commit
e34cb913
authored
May 13, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
May 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Also set the Content-Length header explicitly on the in pipe request.
parent
90027800
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+23
-6
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
e34cb913
...
...
@@ -2230,6 +2230,17 @@ static RPC_STATUS send_echo_request(HINTERNET req, RpcHttpAsyncData *async_data,
return
RPC_S_OK
;
}
static
RPC_STATUS
insert_content_length_header
(
HINTERNET
request
,
DWORD
len
)
{
static
const
WCHAR
fmtW
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
'-'
,
'L'
,
'e'
,
'n'
,
'g'
,
't'
,
'h'
,
':'
,
' '
,
'%'
,
'u'
,
'\r'
,
'\n'
,
0
};
WCHAR
header
[
sizeof
(
fmtW
)
/
sizeof
(
fmtW
[
0
])
+
10
];
sprintfW
(
header
,
fmtW
,
len
);
if
((
HttpAddRequestHeadersW
(
request
,
header
,
-
1
,
HTTP_ADDREQ_FLAG_REPLACE
)))
return
RPC_S_OK
;
return
RPC_S_SERVER_UNAVAILABLE
;
}
/* prepare the in pipe for use by RPC packets */
static
RPC_STATUS
rpcrt4_http_prepare_in_pipe
(
HINTERNET
in_request
,
RpcHttpAsyncData
*
async_data
,
HANDLE
cancel_event
,
const
UUID
*
connection_uuid
,
const
UUID
*
in_pipe_uuid
,
...
...
@@ -2251,6 +2262,9 @@ static RPC_STATUS rpcrt4_http_prepare_in_pipe(HINTERNET in_request, RpcHttpAsync
buffers_in
.
dwStructSize
=
sizeof
(
buffers_in
);
/* FIXME: get this from the registry */
buffers_in
.
dwBufferTotal
=
1024
*
1024
*
1024
;
/* 1Gb */
status
=
insert_content_length_header
(
in_request
,
buffers_in
.
dwBufferTotal
);
if
(
status
!=
RPC_S_OK
)
return
status
;
prepare_async_request
(
async_data
);
ret
=
HttpSendRequestExW
(
in_request
,
&
buffers_in
,
NULL
,
0
,
0
);
status
=
wait_async_request
(
async_data
,
ret
,
cancel_event
);
...
...
@@ -2321,17 +2335,14 @@ static RPC_STATUS rpcrt4_http_prepare_out_pipe(HINTERNET out_request, RpcHttpAsy
const
UUID
*
out_pipe_uuid
,
ULONG
*
flow_control_increment
,
BOOL
authorized
)
{
static
const
WCHAR
fmtW
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
'-'
,
'L'
,
'e'
,
'n'
,
'g'
,
't'
,
'h'
,
':'
,
' '
,
'%'
,
'u'
,
'\r'
,
'\n'
,
0
};
BOOL
ret
;
RPC_STATUS
status
;
RpcPktHdr
*
hdr
;
BYTE
*
data_from_server
;
RpcPktHdr
pkt_from_server
;
ULONG
field1
,
field3
;
DWORD
bytes_read
,
len
;
DWORD
bytes_read
;
BYTE
buf
[
20
];
WCHAR
header
[
sizeof
(
fmtW
)
/
sizeof
(
fmtW
[
0
])
+
10
];
if
(
!
authorized
)
{
...
...
@@ -2345,10 +2356,16 @@ static RPC_STATUS rpcrt4_http_prepare_out_pipe(HINTERNET out_request, RpcHttpAsy
hdr
=
RPCRT4_BuildHttpConnectHeader
(
TRUE
,
connection_uuid
,
out_pipe_uuid
,
NULL
);
if
(
!
hdr
)
return
RPC_S_OUT_OF_RESOURCES
;
status
=
insert_content_length_header
(
out_request
,
hdr
->
common
.
frag_len
);
if
(
status
!=
RPC_S_OK
)
{
RPCRT4_FreeHeader
(
hdr
);
return
status
;
}
TRACE
(
"sending HTTP connect header to server
\n
"
);
prepare_async_request
(
async_data
);
len
=
sprintfW
(
header
,
fmtW
,
hdr
->
common
.
frag_len
);
ret
=
HttpSendRequestW
(
out_request
,
header
,
len
,
hdr
,
hdr
->
common
.
frag_len
);
ret
=
HttpSendRequestW
(
out_request
,
NULL
,
0
,
hdr
,
hdr
->
common
.
frag_len
);
status
=
wait_async_request
(
async_data
,
ret
,
cancel_event
);
RPCRT4_FreeHeader
(
hdr
);
if
(
status
!=
RPC_S_OK
)
return
status
;
...
...
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