[libsoup/hsts: 95/101] Improve the multiple-headers test



commit d8ace9e8974a2e84d1db766f99e0c6a8f45a158f
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Fri Sep 14 12:12:22 2018 +0300

    Improve the multiple-headers test
    
    Ensure that the multiple-headers test checks that only the first
    one is honored and the second one ignored.

 tests/hsts-test.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/tests/hsts-test.c b/tests/hsts-test.c
index 6e12d833..c42f2de9 100644
--- a/tests/hsts-test.c
+++ b/tests/hsts-test.c
@@ -65,7 +65,7 @@ server_callback  (SoupServer *server, SoupMessage *msg,
                                                     "max-age=31536000; includeSubDomains");
                        soup_message_headers_append (msg->response_headers,
                                                     "Strict-Transport-Security",
-                                                    "max-age=0; includeSubDomains");
+                                                    "max-age=1; includeSubDomains");
                } else if (strcmp (path, "/missing-values") == 0) {
                        soup_message_headers_append (msg->response_headers,
                                                     "Strict-Transport-Security",
@@ -292,7 +292,8 @@ do_hsts_multiple_headers_test (void)
 {
        SoupSession *session = hsts_session_new (NULL);
        session_get_uri (session, "https://localhost/multiple-headers";, SOUP_STATUS_OK);
-       session_get_uri (session, "http://localhost/multiple-headers";, SOUP_STATUS_OK);
+       sleep(2);
+       session_get_uri (session, "http://localhost";, SOUP_STATUS_OK);
        soup_test_session_abort_unref (session);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]