Home | History | Annotate | Download | only in data
      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: Thu, 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: Thu, 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 !SSPI
     56 crypto
     57 </features>
     58  <name>
     59 HTTP POST multipart with Expect: header using proxy anyauth (Digest)
     60  </name>
     61  <command>
     62 -x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/259 -F name=daniel -F tool=curl -F file=@log/test259.txt -U uuuser:pppassword --proxy-anyauth
     63 </command>
     64 # We create this file before the command is invoked!
     65 <file name="log/test259.txt">
     66 foo-
     67 This is a moo-
     68 bar
     69 </file>
     70 </client>
     71 
     72 # Verify data after the test has been "shot"
     73 <verify>
     74 <strip>
     75 ^(User-Agent:|Content-Type: multipart/form-data;|------).*
     76 </strip>
     77 <protocol>
     78 POST http://remotehost:54321/we/want/259 HTTP/1.1
     79 Host: remotehost:54321
     80 User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
     81 Accept: */*
     82 Proxy-Connection: Keep-Alive
     83 Content-Length: 409
     84 Expect: 100-continue
     85 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
     86 
     87 ------------------------------7c633d5c27ce
     88 Content-Disposition: form-data; name="name"
     89 
     90 daniel
     91 ------------------------------7c633d5c27ce
     92 Content-Disposition: form-data; name="tool"
     93 
     94 curl
     95 ------------------------------7c633d5c27ce
     96 Content-Disposition: form-data; name="file"; filename="test259.txt"
     97 Content-Type: text/plain
     98 
     99 foo-
    100 This is a moo-
    101 bar
    102 
    103 ------------------------------7c633d5c27ce--
    104 POST http://remotehost:54321/we/want/259 HTTP/1.1
    105 Host: remotehost:54321
    106 User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
    107 Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/259", response="b479994d13e60f3aa192a67c5892ddc5"
    108 Accept: */*
    109 Proxy-Connection: Keep-Alive
    110 Content-Length: 409
    111 Expect: 100-continue
    112 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
    113 
    114 ------------------------------7c633d5c27ce
    115 Content-Disposition: form-data; name="name"
    116 
    117 daniel
    118 ------------------------------7c633d5c27ce
    119 Content-Disposition: form-data; name="tool"
    120 
    121 curl
    122 ------------------------------7c633d5c27ce
    123 Content-Disposition: form-data; name="file"; filename="test259.txt"
    124 Content-Type: text/plain
    125 
    126 foo-
    127 This is a moo-
    128 bar
    129 
    130 ------------------------------7c633d5c27ce--
    131 </protocol>
    132 </verify>
    133 </testcase>
    134