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
08c6c698
Commit
08c6c698
authored
Aug 10, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the processing of the lpszHeaders field in HttpSendRequest.
parent
70d400ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
http.c
dlls/wininet/http.c
+14
-18
No files found.
dlls/wininet/http.c
View file @
08c6c698
...
...
@@ -170,9 +170,18 @@ static BOOL WINAPI HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr,
LPWSTR
buffer
;
WCHAR
value
[
MAX_FIELD_VALUE_LEN
],
field
[
MAX_FIELD_LEN
];
BOOL
bSuccess
=
FALSE
;
DWORD
len
;
TRACE
(
"copying header: %s
\n
"
,
debugstr_w
(
lpszHeader
));
buffer
=
WININET_strdupW
(
lpszHeader
);
if
(
dwHeaderLength
==
~
0UL
)
len
=
strlenW
(
lpszHeader
);
else
len
=
dwHeaderLength
;
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
len
+
1
)
);
strncpyW
(
buffer
,
lpszHeader
,
len
);
buffer
[
len
]
=
0
;
lpszStart
=
buffer
;
do
...
...
@@ -1512,7 +1521,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
static
const
WCHAR
szSetCookie
[]
=
{
'S'
,
'e'
,
't'
,
'-'
,
'C'
,
'o'
,
'o'
,
'k'
,
'i'
,
'e'
,
0
};
static
const
WCHAR
szColon
[]
=
{
':'
,
' '
,
0
};
LPCWSTR
*
req
;
LPWSTR
p
,
szCookedHeaders
=
NULL
;
LPWSTR
p
;
DWORD
len
,
n
;
char
*
ascii_req
;
...
...
@@ -1536,17 +1545,10 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
}
/* add the headers the caller supplied */
if
(
lpszHeaders
)
if
(
lpszHeaders
&&
dwHeaderLength
)
{
len
=
strlenW
(
lpszHeaders
)
+
3
;
szCookedHeaders
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
len
);
strcpyW
(
szCookedHeaders
,
lpszHeaders
);
/* make sure there's exactly one linebreak at the end of the string */
p
=
&
szCookedHeaders
[
len
-
4
];
while
(
(
szCookedHeaders
<=
p
)
&&
((
*
p
==
'\n'
)
||
(
*
p
==
'\r'
))
)
p
--
;
p
[
1
]
=
0
;
HTTP_HttpAddRequestHeadersW
(
lpwhr
,
lpszHeaders
,
dwHeaderLength
,
HTTP_ADDREQ_FLAG_ADD
|
HTTP_ADDHDR_FLAG_REPLACE
);
}
/* allocate space for an array of all the string pointers to be added */
...
...
@@ -1559,11 +1561,6 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
req
[
n
++
]
=
szSpace
;
req
[
n
++
]
=
lpwhr
->
lpszPath
;
req
[
n
++
]
=
HTTPHEADER
;
if
(
szCookedHeaders
)
{
req
[
n
++
]
=
szcrlf
;
req
[
n
++
]
=
szCookedHeaders
;
}
/* Append standard request headers */
for
(
i
=
0
;
i
<=
HTTP_QUERY_MAX
;
i
++
)
...
...
@@ -1609,7 +1606,6 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
req
[
n
]
=
NULL
;
requestString
=
HTTP_build_req
(
req
,
4
);
HeapFree
(
GetProcessHeap
(),
0
,
req
);
HeapFree
(
GetProcessHeap
(),
0
,
szCookedHeaders
);
/*
* Set (header) termination string for request
...
...
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