summaryrefslogtreecommitdiff
path: root/tests/data/test2088
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2019-08-20 14:41:20 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-08-20 14:41:20 +0200
commit54941ff781e11a7da3a584003647c7b01ca1454f (patch)
tree1b37ca18fc9c669fd34da57dd8ebe611bff9608d /tests/data/test2088
parent862393243d16870347e56195e93dc47274e32601 (diff)
downloadcurl-54941ff781e11a7da3a584003647c7b01ca1454f.tar.gz
HSTS: support for HTTP Strict Transport Security using libhstsbagder/hsts-rebased
This patch adds two new configure parameters: --with-libhsts=PATH to point to libhsts --with-hsts-file=FILE to specify location of the dafsa file that contains the domain database
Diffstat (limited to 'tests/data/test2088')
-rw-r--r--tests/data/test208845
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/data/test2088 b/tests/data/test2088
new file mode 100644
index 000000000..569ac02f0
--- /dev/null
+++ b/tests/data/test2088
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+HSTS
+HTTPS
+</keywords>
+</info>
+
+# Client-side
+<client>
+<features>
+HSTS
+debug
+</features>
+<server>
+https
+http-proxy
+</server>
+<name>
+Check that HSTS upgrades http to https
+</name>
+<setenv>
+CURL_HSTSFILE=data/hsts.dafsa
+</setenv>
+<command>
+-x %HOSTIP:%PROXYPORT http://hstsdomain.fake/
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<proxy>
+CONNECT hstsdomain.fake:443 HTTP/1.1
+Host: hstsdomain.fake:443
+Proxy-Connection: Keep-Alive
+
+</proxy>
+<errorcode>
+56
+</errorcode>
+</verify>
+</testcase>