[vlc-commits] https: tests for token parsing
Rémi Denis-Courmont
git at videolan.org
Sun Dec 20 14:25:42 CET 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Dec 20 15:19:53 2015 +0200| [b32d5548f2a646a2dacffaaa270fc20996fe9605] | committer: Rémi Denis-Courmont
https: tests for token parsing
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b32d5548f2a646a2dacffaaa270fc20996fe9605
---
modules/access/http/message_test.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/access/http/message_test.c b/modules/access/http/message_test.c
index 746abbe..2fec662 100644
--- a/modules/access/http/message_test.c
+++ b/modules/access/http/message_test.c
@@ -227,6 +227,14 @@ int main(void)
vlc_http_msg_add_header(m, "TE", "deflate");
str = vlc_http_msg_get_header(m, "TE");
assert(str != NULL && !strcmp(str, "gzip, deflate"));
+ str = vlc_http_msg_get_token(m, "TE", "gzip");
+ assert(str != NULL && !strncmp(str, "gzip", 4));
+ str = vlc_http_msg_get_token(m, "TE", "deflate");
+ assert(str != NULL && !strncmp(str, "deflate", 7));
+ str = vlc_http_msg_get_token(m, "TE", "compress");
+ assert(str == NULL);
+ str = vlc_http_msg_get_token(m, "Accept-Encoding", "gzip");
+ assert(str == NULL);
vlc_http_msg_add_header(m, "Cookie", "a=1");
vlc_http_msg_add_header(m, "Cookie", "b=2");
More information about the vlc-commits
mailing list