quickjs-tart

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

test259 (3232B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP FORMPOST
      6 HTTP proxy
      7 HTTP proxy Digest auth
      8 --proxy-anyauth
      9 </keywords>
     10 </info>
     11 # Server-side
     12 <reply>
     13 # The stupid test server doesn't response anything at all until the full
     14 # request has been sent, and then of course the full POST has already been
     15 # sent!
     16 <data>
     17 HTTP/1.1 407 no, tell me who you are first
     18 Date: Tue, 09 Nov 2010 14:49:00 GMT
     19 Server: test-server/fake
     20 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
     21 Content-Length: 0
     22 
     23 </data>
     24 <data1000>
     25 HTTP/1.1 200 A OK
     26 Server: Microsoft-IIS/6.0
     27 Content-Type: text/html; charset=iso-8859-1
     28 Content-Length: 3
     29 
     30 ok
     31 </data1000>
     32 <datacheck>
     33 HTTP/1.1 407 no, tell me who you are first
     34 Date: Tue, 09 Nov 2010 14:49:00 GMT
     35 Server: test-server/fake
     36 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
     37 Content-Length: 0
     38 
     39 HTTP/1.1 200 A OK
     40 Server: Microsoft-IIS/6.0
     41 Content-Type: text/html; charset=iso-8859-1
     42 Content-Length: 3
     43 
     44 ok
     45 </datacheck>
     46 
     47 </reply>
     48 
     49 # Client-side
     50 <client>
     51 <server>
     52 http
     53 </server>
     54 <features>
     55 Mime
     56 !SSPI
     57 crypto
     58 proxy
     59 digest
     60 </features>
     61 <name>
     62 HTTP POST multipart with Expect: header using proxy anyauth (Digest)
     63 </name>
     64 <command>
     65 -x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@%LOGDIR/test%TESTNUMBER.txt -U uuuser:pppassword --proxy-anyauth -H "Expect: 100-continue"
     66 </command>
     67 # We create this file before the command is invoked!
     68 <file name="%LOGDIR/test%TESTNUMBER.txt">
     69 foo-
     70 This is a moo-
     71 bar
     72 </file>
     73 </client>
     74 
     75 # Verify data after the test has been "shot"
     76 <verify>
     77 <strip>
     78 ^(Content-Type: multipart/form-data;|------).*
     79 </strip>
     80 <protocol>
     81 POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
     82 Host: remotehost:54321
     83 User-Agent: curl/%VERSION
     84 Accept: */*
     85 Proxy-Connection: Keep-Alive
     86 Expect: 100-continue
     87 Content-Length: 433
     88 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
     89 
     90 ------------------------------7c633d5c27ce
     91 Content-Disposition: form-data; name="name"
     92 
     93 daniel
     94 ------------------------------7c633d5c27ce
     95 Content-Disposition: form-data; name="tool"
     96 
     97 curl
     98 ------------------------------7c633d5c27ce
     99 Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"
    100 Content-Type: text/plain
    101 
    102 foo-
    103 This is a moo-
    104 bar
    105 
    106 ------------------------------7c633d5c27ce--
    107 POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
    108 Host: remotehost:54321
    109 Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="b479994d13e60f3aa192a67c5892ddc5"
    110 User-Agent: curl/%VERSION
    111 Accept: */*
    112 Proxy-Connection: Keep-Alive
    113 Expect: 100-continue
    114 Content-Length: 433
    115 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
    116 
    117 ------------------------------7c633d5c27ce
    118 Content-Disposition: form-data; name="name"
    119 
    120 daniel
    121 ------------------------------7c633d5c27ce
    122 Content-Disposition: form-data; name="tool"
    123 
    124 curl
    125 ------------------------------7c633d5c27ce
    126 Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"
    127 Content-Type: text/plain
    128 
    129 foo-
    130 This is a moo-
    131 bar
    132 
    133 ------------------------------7c633d5c27ce--
    134 </protocol>
    135 </verify>
    136 </testcase>