quickjs-tart

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

test898 (1680B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP proxy
      6 --location
      7 Authorization
      8 cookies
      9 </keywords>
     10 </info>
     11 
     12 #
     13 # Server-side
     14 <reply>
     15 <data>
     16 HTTP/1.1 301 redirect
     17 Date: Tue, 09 Nov 2010 14:49:00 GMT
     18 Server: test-server/fake
     19 Content-Length: 0
     20 Connection: close
     21 Content-Type: text/html
     22 Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002
     23 
     24 </data>
     25 <data2>
     26 HTTP/1.1 200 OK
     27 Date: Tue, 09 Nov 2010 14:49:00 GMT
     28 Server: test-server/fake
     29 Content-Length: 4
     30 Connection: close
     31 Content-Type: text/html
     32 
     33 hey
     34 </data2>
     35 
     36 <datacheck>
     37 HTTP/1.1 301 redirect
     38 Date: Tue, 09 Nov 2010 14:49:00 GMT
     39 Server: test-server/fake
     40 Content-Length: 0
     41 Connection: close
     42 Content-Type: text/html
     43 Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002
     44 
     45 HTTP/1.1 200 OK
     46 Date: Tue, 09 Nov 2010 14:49:00 GMT
     47 Server: test-server/fake
     48 Content-Length: 4
     49 Connection: close
     50 Content-Type: text/html
     51 
     52 hey
     53 </datacheck>
     54 
     55 </reply>
     56 
     57 #
     58 # Client-side
     59 <client>
     60 <features>
     61 proxy
     62 </features>
     63 <server>
     64 http
     65 </server>
     66 <name>
     67 HTTP with custom auth and cookies redirected to HTTP on a diff port
     68 </name>
     69 <command>
     70 -x http://%HOSTIP:%HTTPPORT http://firsthost.com -L -H "Authorization: Basic %b64[joe:secret]b64%" -H "Cookie: userpwd=am9lOnNlY3JldA=="
     71 </command>
     72 </client>
     73 
     74 #
     75 # Verify data after the test has been "shot"
     76 <verify>
     77 <protocol>
     78 GET http://firsthost.com/ HTTP/1.1
     79 Host: firsthost.com
     80 User-Agent: curl/%VERSION
     81 Accept: */*
     82 Proxy-Connection: Keep-Alive
     83 Authorization: Basic %b64[joe:secret]b64%
     84 Cookie: userpwd=am9lOnNlY3JldA==
     85 
     86 GET http://firsthost.com:9999/a/path/%TESTNUMBER0002 HTTP/1.1
     87 Host: firsthost.com:9999
     88 User-Agent: curl/%VERSION
     89 Accept: */*
     90 Proxy-Connection: Keep-Alive
     91 
     92 </protocol>
     93 </verify>
     94 </testcase>