quickjs-tart

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

test973 (1245B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 FTP
      6 --location
      7 </keywords>
      8 </info>
      9 
     10 #
     11 # Server-side
     12 <reply>
     13 <data>
     14 HTTP/1.1 301 redirect
     15 Date: Tue, 09 Nov 2010 14:49:00 GMT
     16 Server: test-server/fake
     17 Content-Length: 0
     18 Connection: close
     19 Content-Type: text/html
     20 Location: ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER0002
     21 
     22 </data>
     23 <data2>
     24 data
     25     to
     26       see
     27 that FTP
     28 works
     29   so does it?
     30 </data2>
     31 
     32 <datacheck>
     33 HTTP/1.1 301 redirect
     34 Date: Tue, 09 Nov 2010 14:49:00 GMT
     35 Server: test-server/fake
     36 Content-Length: 0
     37 Connection: close
     38 Content-Type: text/html
     39 Location: ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER0002
     40 
     41 data
     42     to
     43       see
     44 that FTP
     45 works
     46   so does it?
     47 </datacheck>
     48 
     49 </reply>
     50 
     51 #
     52 # Client-side
     53 <client>
     54 <server>
     55 http
     56 ftp
     57 </server>
     58 <name>
     59 HTTP with auth redirected to FTP w/o auth
     60 </name>
     61 <command>
     62 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -L -u joe:secret
     63 </command>
     64 </client>
     65 
     66 #
     67 # Verify data after the test has been "shot"
     68 <verify>
     69 <strip>
     70 QUIT
     71 </strip>
     72 <protocol>
     73 GET /%TESTNUMBER HTTP/1.1
     74 Host: %HOSTIP:%HTTPPORT
     75 Authorization: Basic %b64[joe:secret]b64%
     76 User-Agent: curl/%VERSION
     77 Accept: */*
     78 
     79 USER anonymous
     80 PASS ftp@example.com
     81 PWD
     82 CWD a
     83 CWD path
     84 EPSV
     85 TYPE I
     86 SIZE %TESTNUMBER0002
     87 RETR %TESTNUMBER0002
     88 QUIT
     89 </protocol>
     90 </verify>
     91 </testcase>