[libsoup] logger-test: fix the test when brotli is enabled
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] logger-test: fix the test when brotli is enabled
- Date: Tue, 25 May 2021 11:33:17 +0000 (UTC)
commit 6298501a657d6f97792212acf40c3ef8d0753e63
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Tue May 25 13:32:51 2021 +0200
logger-test: fix the test when brotli is enabled
tests/logger-test.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/tests/logger-test.c b/tests/logger-test.c
index 19145b21..ee9707a0 100644
--- a/tests/logger-test.c
+++ b/tests/logger-test.c
@@ -143,7 +143,11 @@ do_logger_headers_test (void)
host = g_strdup_printf ("127.0.0.1:%d", g_uri_get_port (base_uri));
g_assert_cmpstr (g_hash_table_lookup (log.request, "Host"), ==, host);
g_free (host);
+#ifdef WITH_BROTLI
+ g_assert_cmpstr (g_hash_table_lookup (log.request, "Accept-Encoding"), ==, "gzip, deflate, br");
+#else
g_assert_cmpstr (g_hash_table_lookup (log.request, "Accept-Encoding"), ==, "gzip, deflate");
+#endif
g_assert_cmpstr (g_hash_table_lookup (log.request, "Connection"), ==, "Keep-Alive");
g_assert_nonnull (log.response);
@@ -213,7 +217,11 @@ do_logger_body_test (void)
host = g_strdup_printf ("127.0.0.1:%d", g_uri_get_port (base_uri));
g_assert_cmpstr (g_hash_table_lookup (log.request, "Host"), ==, host);
g_free (host);
+#ifdef WITH_BROTLI
+ g_assert_cmpstr (g_hash_table_lookup (log.request, "Accept-Encoding"), ==, "gzip, deflate, br");
+#else
g_assert_cmpstr (g_hash_table_lookup (log.request, "Accept-Encoding"), ==, "gzip, deflate");
+#endif
g_assert_cmpstr (g_hash_table_lookup (log.request, "Connection"), ==, "Keep-Alive");
g_assert_cmpint (atoi (g_hash_table_lookup (log.request, "Content-Length")), ==, sizeof (body_data)
- 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]