quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test1056 (1676B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP GET
      6 followlocation
      7 IPv6
      8 </keywords>
      9 </info>
     10 
     11 #
     12 # Server-side
     13 <reply>
     14 <data>
     15 HTTP/1.1 302 OK swsclose
     16 Location: http://[::1%259999]:%HTTP6PORT/moo/%TESTNUMBER0002
     17 Date: Thu, 31 Jul 2008 14:49:00 GMT
     18 Connection: close
     19 
     20 </data>
     21 <data2>
     22 HTTP/1.1 200 OK swsclose
     23 Date: Thu, 31 Jul 2008 14:49:00 GMT
     24 Connection: close
     25 
     26 body
     27 </data2>
     28 <datacheck>
     29 HTTP/1.1 302 OK swsclose
     30 Location: http://[::1%259999]:%HTTP6PORT/moo/%TESTNUMBER0002
     31 Date: Thu, 31 Jul 2008 14:49:00 GMT
     32 Connection: close
     33 
     34 HTTP/1.1 200 OK swsclose
     35 Date: Thu, 31 Jul 2008 14:49:00 GMT
     36 Connection: close
     37 
     38 body
     39 </datacheck>
     40 </reply>
     41 
     42 #
     43 # Client-side
     44 <client>
     45 # This test relies on the IPv6 scope field being ignored when connecting to
     46 # ipv6-localhost (i.e. [::1%259999] is treated as [::1]). Maybe this is a bit
     47 # dodgy, but it happens on all our test platforms but Windows so skip this
     48 # test there. This feature doesn't work on msys or Cygwin, so use a precheck
     49 # to skip those.
     50 <features>
     51 IPv6
     52 !win32
     53 </features>
     54 <server>
     55 http
     56 http-ipv6
     57 </server>
     58 <name>
     59 HTTP follow redirect from IPv4 to IPv6 with scope
     60 </name>
     61 <command>
     62 http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
     63 </command>
     64 <precheck>
     65 %PERL -e "print 'Test is not supported on the Windows kernel' if($^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin');"
     66 </precheck>
     67 </client>
     68 
     69 #
     70 # Verify data after the test has been "shot"
     71 <verify>
     72 <protocol>
     73 GET /we/are/all/twits/%TESTNUMBER HTTP/1.1
     74 Host: %HOSTIP:%HTTPPORT
     75 User-Agent: curl/%VERSION
     76 Accept: */*
     77 
     78 GET /moo/%TESTNUMBER0002 HTTP/1.1
     79 Host: %HOST6IP:%HTTP6PORT
     80 User-Agent: curl/%VERSION
     81 Accept: */*
     82 
     83 </protocol>
     84 </verify>
     85 </testcase>