quickjs-tart

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

test644 (1466B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 xattr
      6 </keywords>
      7 </info>
      8 
      9 #
     10 # Server-side
     11 <reply>
     12 <data nocheck="yes">
     13 HTTP/1.1 301 OK
     14 Date: Tue, 09 Nov 2010 14:49:00 GMT
     15 Server: test-server/fake
     16 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
     17 ETag: "21025-dc7-39462498"
     18 Accept-Ranges: bytes
     19 Content-Length: 6
     20 Connection: close
     21 Content-Type: fake/data
     22 Funny-head: yesyes
     23 Location: data/%TESTNUMBER0002.txt?coolsite=yes
     24 
     25 -foo-
     26 </data>
     27 <data2 nocheck="yes">
     28 HTTP/1.1 200 OK
     29 Date: Tue, 09 Nov 2010 14:49:00 GMT
     30 Server: test-server/real
     31 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
     32 ETag: "21025-dc7-39462498"
     33 Accept-Ranges: bytes
     34 Content-Length: 6
     35 Connection: close
     36 Content-Type: text/html
     37 Funny-head: yesyes
     38 
     39 -foo-
     40 </data2>
     41 </reply>
     42 
     43 #
     44 # Client-side
     45 <client>
     46 <server>
     47 http
     48 </server>
     49 <features>
     50 Debug
     51 xattr
     52 </features>
     53 # simulate the xattr operations
     54 <setenv>
     55 CURL_FAKE_XATTR=1
     56 </setenv>
     57 <name>
     58 --xattr with redirect
     59 </name>
     60 <command>
     61 http://%HOSTIP:%HTTPPORT/%TESTNUMBER --xattr -L -o %LOGDIR/out%TESTNUMBER
     62 </command>
     63 </client>
     64 
     65 #
     66 # Verify data after the test has been "shot"
     67 <verify>
     68 <protocol>
     69 GET /%TESTNUMBER HTTP/1.1
     70 Host: %HOSTIP:%HTTPPORT
     71 User-Agent: curl/%VERSION
     72 Accept: */*
     73 
     74 GET /data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
     75 Host: %HOSTIP:%HTTPPORT
     76 User-Agent: curl/%VERSION
     77 Accept: */*
     78 
     79 </protocol>
     80 <stdout mode="text">
     81 user.creator => curl
     82 user.mime_type => text/html
     83 user.xdg.origin.url => http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     84 </stdout>
     85 </verify>
     86 </testcase>