]> gitweb.factorcode.org Git - factor.git/commitdiff
Add an SNI-based http.client test
authorBenjamin Pollack <benjamin@bitquabit.com>
Thu, 3 Mar 2016 17:45:03 +0000 (12:45 -0500)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 3 Mar 2016 17:48:20 +0000 (09:48 -0800)
basis/http/client/client-tests.factor

index 8e59ae4fd47640212daccee5cc52458a48de0b53..9f3587507c900bf6a9d11dbd6b389f5274382a39 100644 (file)
@@ -1,4 +1,4 @@
-USING: accessors http.client http.client.private http
+USING: accessors io.sockets.secure http.client http.client.private http
 io.streams.string kernel namespaces sequences tools.test urls ;
 IN: http.client.tests
 
@@ -42,6 +42,11 @@ IN: http.client.tests
 { "DELETE" } [ "http://arc.com" <delete-request> method>> ] unit-test
 { "TRACE" } [ "http://concatenative.org" <trace-request> method>> ] unit-test
 { "OPTIONS" } [ "http://factorcode.org" <options-request> method>> ] unit-test
+{ t } [
+    "https://alice.sni.velox.ch" http-get nip
+    [ "Great!" swap subseq? ]
+    [ "TLS SNI Test Site: alice.sni.velox.ch" swap subseq? ] bi and
+] unit-test
 
 { t } [
     {