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
71874a38
Commit
71874a38
authored
Mar 05, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Make sure to clear response headers from a previous request.
parent
418d2ce5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
request.c
dlls/winhttp/request.c
+16
-16
No files found.
dlls/winhttp/request.c
View file @
71874a38
...
...
@@ -1038,6 +1038,20 @@ static BOOL add_host_header( request_t *request, DWORD modifier )
return
ret
;
}
static
void
clear_response_headers
(
request_t
*
request
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
request
->
num_headers
;
i
++
)
{
if
(
!
request
->
headers
[
i
].
field
)
continue
;
if
(
!
request
->
headers
[
i
].
value
)
continue
;
if
(
request
->
headers
[
i
].
is_request
)
continue
;
delete_header
(
request
,
i
);
i
--
;
}
}
static
BOOL
send_request
(
request_t
*
request
,
LPCWSTR
headers
,
DWORD
headers_len
,
LPVOID
optional
,
DWORD
optional_len
,
DWORD
total_len
,
DWORD_PTR
context
,
BOOL
async
)
{
...
...
@@ -1053,6 +1067,8 @@ static BOOL send_request( request_t *request, LPCWSTR headers, DWORD headers_len
int
bytes_sent
;
DWORD
len
,
i
,
flags
;
clear_response_headers
(
request
);
flags
=
WINHTTP_ADDREQ_FLAG_ADD
|
WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
;
for
(
i
=
0
;
i
<
request
->
num_accept_types
;
i
++
)
{
...
...
@@ -1457,20 +1473,6 @@ static BOOL handle_authorization( request_t *request, DWORD status )
return
FALSE
;
}
static
void
clear_response_headers
(
request_t
*
request
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
request
->
num_headers
;
i
++
)
{
if
(
!
request
->
headers
[
i
].
field
)
continue
;
if
(
!
request
->
headers
[
i
].
value
)
continue
;
if
(
request
->
headers
[
i
].
is_request
)
continue
;
delete_header
(
request
,
i
);
i
--
;
}
}
#define MAX_REPLY_LEN 1460
#define INITIAL_HEADER_BUFFER_LEN 512
...
...
@@ -1897,7 +1899,6 @@ static BOOL receive_response( request_t *request, BOOL async )
if
(
!
(
ret
=
handle_redirect
(
request
,
status
)))
break
;
clear_response_headers
(
request
);
send_request
(
request
,
NULL
,
0
,
NULL
,
0
,
0
,
0
,
FALSE
);
/* recurse synchronously */
continue
;
}
...
...
@@ -1911,7 +1912,6 @@ static BOOL receive_response( request_t *request, BOOL async )
ret
=
TRUE
;
break
;
}
clear_response_headers
(
request
);
send_request
(
request
,
NULL
,
0
,
NULL
,
0
,
0
,
0
,
FALSE
);
continue
;
}
...
...
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