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
413934ca
Commit
413934ca
authored
Jun 14, 2009
by
Mike Kaplinskiy
Committed by
Alexandre Julliard
Jun 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/test: Test malformed header separators.
parent
6c767c4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
http.c
dlls/wininet/tests/http.c
+23
-0
No files found.
dlls/wininet/tests/http.c
View file @
413934ca
...
...
@@ -1453,6 +1453,29 @@ static void HttpHeaders_test(void)
ok
(
index
==
1
,
"Index was not incremented
\n
"
);
ok
(
strcmp
(
buffer
,
"value"
)
==
0
,
"incorrect string was returned(%s)
\n
"
,
buffer
);
/* Ensure that malformed header separators are ignored and don't cause a failure */
ok
(
HttpAddRequestHeaders
(
hRequest
,
"
\r\r
MalformedTest:value
\n\n
MalformedTestTwo: value2
\r
MalformedTestThree: value3
\n\n\r\r\n
"
,
-
1
,
HTTP_ADDREQ_FLAG_ADD
|
HTTP_ADDREQ_FLAG_REPLACE
),
"Failed to add header with malformed entries in list
\n
"
);
index
=
0
;
len
=
sizeof
(
buffer
);
strcpy
(
buffer
,
"MalformedTest"
);
ok
(
HttpQueryInfo
(
hRequest
,
HTTP_QUERY_CUSTOM
|
HTTP_QUERY_FLAG_REQUEST_HEADERS
,
buffer
,
&
len
,
&
index
),
"Unable to query header
\n
"
);
ok
(
index
==
1
,
"Index was not incremented
\n
"
);
ok
(
strcmp
(
buffer
,
"value"
)
==
0
,
"incorrect string was returned(%s)
\n
"
,
buffer
);
index
=
0
;
len
=
sizeof
(
buffer
);
strcpy
(
buffer
,
"MalformedTestTwo"
);
ok
(
HttpQueryInfo
(
hRequest
,
HTTP_QUERY_CUSTOM
|
HTTP_QUERY_FLAG_REQUEST_HEADERS
,
buffer
,
&
len
,
&
index
),
"Unable to query header
\n
"
);
ok
(
index
==
1
,
"Index was not incremented
\n
"
);
ok
(
strcmp
(
buffer
,
"value2"
)
==
0
,
"incorrect string was returned(%s)
\n
"
,
buffer
);
index
=
0
;
len
=
sizeof
(
buffer
);
strcpy
(
buffer
,
"MalformedTestThree"
);
ok
(
HttpQueryInfo
(
hRequest
,
HTTP_QUERY_CUSTOM
|
HTTP_QUERY_FLAG_REQUEST_HEADERS
,
buffer
,
&
len
,
&
index
),
"Unable to query header
\n
"
);
ok
(
index
==
1
,
"Index was not incremented
\n
"
);
ok
(
strcmp
(
buffer
,
"value3"
)
==
0
,
"incorrect string was returned(%s)
\n
"
,
buffer
);
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