quickjs-tart

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

test1090 (1605B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP GET
      6 followlocation
      7 chunked Transfer-Encoding
      8 --write-out
      9 </keywords>
     10 </info>
     11 
     12 #
     13 # Server-side
     14 <reply>
     15 <data nocheck="yes">
     16 HTTP/1.1 302 OK swsbounce swsclose
     17 Date: Tue, 09 Nov 2010 14:49:00 GMT
     18 Content-Length: 8
     19 Connection: close
     20 Content-Type: text/plain
     21 Location: ./%TESTNUMBER0001
     22 
     23 monster
     24 </data>
     25 <data1 nocheck="yes">
     26 HTTP/1.1 200 OK
     27 Date: Tue, 09 Nov 2010 14:49:00 GMT
     28 Transfer-Encoding: chunked
     29 Connection: close
     30 Content-Type: text/plain; charset=us-ascii
     31 
     32 0007
     33 bigger 
     34 0008
     35 monster
     36 
     37 0
     38 
     39 </data1>
     40 
     41 </reply>
     42 
     43 #
     44 # Client-side
     45 <client>
     46 <server>
     47 http
     48 </server>
     49 <name>
     50 HTTP GET --write-out with redirected fetch and chunked reply
     51 </name>
     52 <command>
     53 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
     54 </command>
     55 </client>
     56 
     57 #
     58 # Verify data after the test has been "shot"
     59 <verify>
     60 <protocol>
     61 GET /%TESTNUMBER HTTP/1.1
     62 Host: %HOSTIP:%HTTPPORT
     63 User-Agent: curl/%VERSION
     64 Accept: */*
     65 
     66 GET /%TESTNUMBER0001 HTTP/1.1
     67 Host: %HOSTIP:%HTTPPORT
     68 User-Agent: curl/%VERSION
     69 Accept: */*
     70 
     71 </protocol>
     72 
     73 <stdout>
     74 HTTP/1.1 302 OK swsbounce swsclose
     75 Date: Tue, 09 Nov 2010 14:49:00 GMT
     76 Content-Length: 8
     77 Connection: close
     78 Content-Type: text/plain
     79 Location: ./%TESTNUMBER0001
     80 
     81 HTTP/1.1 200 OK
     82 Date: Tue, 09 Nov 2010 14:49:00 GMT
     83 Transfer-Encoding: chunked
     84 Connection: close
     85 Content-Type: text/plain; charset=us-ascii
     86 
     87 bigger monster
     88 2
     89 1
     90 15
     91 http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
     92 text/plain; charset=us-ascii
     93 200
     94 </stdout>
     95 
     96 </verify>
     97 </testcase>