quickjs-tart

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

test1325 (1355B)


      1 <testcase>
      2 # https://greenbytes.de/tech/webdav/draft-reschke-http-status-308-latest.html
      3 <info>
      4 <keywords>
      5 HTTP
      6 HTTP GET
      7 308
      8 followlocation
      9 </keywords>
     10 </info>
     11 #
     12 # Server-side
     13 <reply>
     14 <data>
     15 HTTP/1.1 308 OK swsclose
     16 Location: %TESTNUMBER0002
     17 Date: Tue, 09 Nov 2010 14:49:00 GMT
     18 Connection: close
     19 
     20 </data>
     21 <data2>
     22 HTTP/1.1 200 OK swsclose
     23 Location: this should be ignored
     24 Date: Tue, 09 Nov 2010 14:49:00 GMT
     25 Connection: close
     26 
     27 body
     28 </data2>
     29 <datacheck>
     30 HTTP/1.1 308 OK swsclose
     31 Location: %TESTNUMBER0002
     32 Date: Tue, 09 Nov 2010 14:49:00 GMT
     33 Connection: close
     34 
     35 HTTP/1.1 200 OK swsclose
     36 Location: this should be ignored
     37 Date: Tue, 09 Nov 2010 14:49:00 GMT
     38 Connection: close
     39 
     40 body
     41 </datacheck>
     42 </reply>
     43 
     44 #
     45 # Client-side
     46 <client>
     47 <server>
     48 http
     49 </server>
     50 <name>
     51 HTTP 308-redirect with POST
     52 </name>
     53 <command>
     54 http://%HOSTIP:%HTTPPORT/we/%TESTNUMBER -L -d "moo"
     55 </command>
     56 </client>
     57 
     58 #
     59 # Verify data after the test has been "shot"
     60 <verify>
     61 <protocol nonewline="yes">
     62 POST /we/%TESTNUMBER HTTP/1.1
     63 Host: %HOSTIP:%HTTPPORT
     64 User-Agent: curl/%VERSION
     65 Accept: */*
     66 Content-Length: 3
     67 Content-Type: application/x-www-form-urlencoded
     68 
     69 mooPOST /we/%TESTNUMBER0002 HTTP/1.1
     70 Host: %HOSTIP:%HTTPPORT
     71 User-Agent: curl/%VERSION
     72 Accept: */*
     73 Content-Length: 3
     74 Content-Type: application/x-www-form-urlencoded
     75 
     76 moo
     77 </protocol>
     78 </verify>
     79 </testcase>