quickjs-tart

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

test1184 (1988B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP CONNECT
      6 HTTP proxy
      7 proxytunnel
      8 </keywords>
      9 </info>
     10 
     11 #
     12 # Server-side
     13 <reply>
     14 <connect>
     15 HTTP/1.1 200 Mighty fine indeed
     16 Server: test tunnel 2000
     17 
     18 </connect>
     19 
     20 <data nocheck="yes">
     21 HTTP/1.1 302 OK
     22 Location: http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER0002
     23 Date: Tue, 09 Nov 2010 14:49:00 GMT
     24 Server: test-server/fake
     25 Content-Type: text/html
     26 Funny-head: yesyes
     27 Content-Length: 9
     28 Connection: close
     29 
     30 contents
     31 </data>
     32 
     33 <data2 nocheck="yes">
     34 HTTP/1.1 200 OK
     35 Content-Length: 7
     36 
     37 second
     38 </data2>
     39 </reply>
     40 
     41 #
     42 # Client-side
     43 <client>
     44 <server>
     45 http
     46 http-proxy
     47 </server>
     48 <name>
     49 HTTP 1.1 CONNECT with redirect and set -H user-agent
     50 </name>
     51 <command>
     52 -x %HOSTIP:%PROXYPORT -p http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -L -H "User-Agent: %TESTNUMBER-agent"
     53 </command>
     54 <features>
     55 proxy
     56 </features>
     57 </client>
     58 
     59 #
     60 # Verify data after the test has been "shot"
     61 <verify>
     62 <proxy>
     63 CONNECT %HOSTIP.%TESTNUMBER:%HTTPPORT HTTP/1.1
     64 Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
     65 User-Agent: curl/%VERSION
     66 Proxy-Connection: Keep-Alive
     67 
     68 CONNECT %HOSTIP.%TESTNUMBER:%HTTPPORT HTTP/1.1
     69 Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
     70 User-Agent: curl/%VERSION
     71 Proxy-Connection: Keep-Alive
     72 
     73 </proxy>
     74 <protocol>
     75 GET /we/want/that/page/%TESTNUMBER HTTP/1.1
     76 Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
     77 Accept: */*
     78 User-Agent: %TESTNUMBER-agent
     79 
     80 GET /we/want/that/page/%TESTNUMBER0002 HTTP/1.1
     81 Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
     82 Accept: */*
     83 User-Agent: %TESTNUMBER-agent
     84 
     85 </protocol>
     86 <stdout>
     87 HTTP/1.1 200 Mighty fine indeed
     88 Server: test tunnel 2000
     89 
     90 HTTP/1.1 302 OK
     91 Location: http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER0002
     92 Date: Tue, 09 Nov 2010 14:49:00 GMT
     93 Server: test-server/fake
     94 Content-Type: text/html
     95 Funny-head: yesyes
     96 Content-Length: 9
     97 Connection: close
     98 
     99 HTTP/1.1 200 Mighty fine indeed
    100 Server: test tunnel 2000
    101 
    102 HTTP/1.1 200 OK
    103 Content-Length: 7
    104 
    105 second
    106 </stdout>
    107 </verify>
    108 </testcase>