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
1bf936c9
Commit
1bf936c9
authored
Aug 29, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Replacing a header with an empty value deletes it.
parent
cf380c9c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
http.c
dlls/wininet/http.c
+1
-1
http.c
dlls/wininet/tests/http.c
+21
-0
No files found.
dlls/wininet/http.c
View file @
1bf936c9
...
...
@@ -6062,7 +6062,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
{
HTTP_DeleteCustomHeader
(
request
,
index
);
if
(
value
)
if
(
value
&&
value
[
0
]
)
{
HTTPHEADERW
hdr
;
...
...
dlls/wininet/tests/http.c
View file @
1bf936c9
...
...
@@ -1759,6 +1759,27 @@ static void HttpHeaders_test(void)
ok
(
index
==
1
,
"Index was not incremented
\n
"
);
ok
(
strcmp
(
buffer
,
"value3"
)
==
0
,
"incorrect string was returned(%s)
\n
"
,
buffer
);
ok
(
HttpAddRequestHeaders
(
hRequest
,
"Authorization: Basic
\r\n
"
,
-
1
,
HTTP_ADDREQ_FLAG_ADD
),
"unable to add header %u
\n
"
,
GetLastError
());
index
=
0
;
buffer
[
0
]
=
0
;
len
=
sizeof
(
buffer
);
ok
(
HttpQueryInfo
(
hRequest
,
HTTP_QUERY_AUTHORIZATION
|
HTTP_QUERY_FLAG_REQUEST_HEADERS
,
buffer
,
&
len
,
&
index
),
"unable to query header %u
\n
"
,
GetLastError
());
ok
(
index
==
1
,
"index was not incremented
\n
"
);
ok
(
!
strcmp
(
buffer
,
"Basic"
),
"incorrect string was returned (%s)
\n
"
,
buffer
);
ok
(
HttpAddRequestHeaders
(
hRequest
,
"Authorization:
\r\n
"
,
-
1
,
HTTP_ADDREQ_FLAG_REPLACE
),
"unable to remove header %u
\n
"
,
GetLastError
());
index
=
0
;
len
=
sizeof
(
buffer
);
SetLastError
(
0xdeadbeef
);
ok
(
!
HttpQueryInfo
(
hRequest
,
HTTP_QUERY_AUTHORIZATION
|
HTTP_QUERY_FLAG_REQUEST_HEADERS
,
buffer
,
&
len
,
&
index
),
"header still present
\n
"
);
ok
(
GetLastError
()
==
ERROR_HTTP_HEADER_NOT_FOUND
,
"got %u
\n
"
,
GetLastError
());
ok
(
InternetCloseHandle
(
hRequest
),
"Close request handle failed
\n
"
);
done:
ok
(
InternetCloseHandle
(
hConnect
),
"Close connect handle failed
\n
"
);
...
...
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