[libsoup/hsts: 14/20] Improve the multiple-headers test



commit cd2daaad31bf0e41900632f72e97e92ce22c3d6a
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 5ce67886..7b0cf673 100644
--- a/tests/hsts-test.c
+++ b/tests/hsts-test.c
@@ -64,7 +64,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",
@@ -291,7 +291,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]