Home | History | Annotate | Download | only in data
      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP FORMPOST
      6 HTTP replaced headers
      7 HTTP proxy
      8 HTTP proxy Digest auth
      9 --proxy-anyauth
     10 </keywords>
     11 
     12 </info>
     13 # Server-side
     14 <reply>
     15 # The stupid test server doesn't response anything at all until the full
     16 # request has been sent, and then of course the full POST has already been
     17 # sent!
     18 <data>
     19 HTTP/1.1 407 no, tell me who you are first swsclose
     20 Date: Thu, 09 Nov 2010 14:49:00 GMT
     21 Server: test-server/fake
     22 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
     23 Content-Length: 0
     24 
     25 </data>
     26 <data1000>
     27 HTTP/1.1 200 A OK
     28 Server: Microsoft-IIS/6.0
     29 Content-Type: text/html; charset=iso-8859-1
     30 Content-Length: 3
     31 
     32 ok
     33 </data1000>
     34 <datacheck>
     35 HTTP/1.1 407 no, tell me who you are first swsclose
     36 Date: Thu, 09 Nov 2010 14:49:00 GMT
     37 Server: test-server/fake
     38 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
     39 Content-Length: 0
     40 
     41 HTTP/1.1 200 A OK
     42 Server: Microsoft-IIS/6.0
     43 Content-Type: text/html; charset=iso-8859-1
     44 Content-Length: 3
     45 
     46 ok
     47 </datacheck>
     48 
     49 </reply>
     50 
     51 # Client-side
     52 <client>
     53 <server>
     54 http
     55 </server>
     56 <features>
     57 !SSPI
     58 crypto
     59 </features>
     60  <name>
     61 HTTP POST multipart without Expect: header using proxy anyauth (Digest)
     62  </name>
     63  <command>
     64 -x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/258 -F name=daniel -F tool=curl -F file=@log/test258.txt -H "Expect:" -U uuuser:pppassword --proxy-anyauth
     65 </command>
     66 # We create this file before the command is invoked!
     67 <file name="log/test258.txt">
     68 foo-
     69 This is a moo-
     70 bar
     71 </file>
     72 </client>
     73 
     74 # Verify data after the test has been "shot"
     75 <verify>
     76 <strip>
     77 ^(User-Agent:|Content-Type: multipart/form-data;|------).*
     78 </strip>
     79 <protocol>
     80 POST http://remotehost:54321/we/want/258 HTTP/1.1
     81 Host: remotehost:54321
     82 User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
     83 Accept: */*
     84 Content-Length: 409
     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="test258.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/258 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/258", response="2501654ca391f0b5c8c12a1da77e34cd"
    108 Accept: */*
    109 Content-Length: 409
    110 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
    111 
    112 ------------------------------7c633d5c27ce
    113 Content-Disposition: form-data; name="name"
    114 
    115 daniel
    116 ------------------------------7c633d5c27ce
    117 Content-Disposition: form-data; name="tool"
    118 
    119 curl
    120 ------------------------------7c633d5c27ce
    121 Content-Disposition: form-data; name="file"; filename="test258.txt"
    122 Content-Type: text/plain
    123 
    124 foo-
    125 This is a moo-
    126 bar
    127 
    128 ------------------------------7c633d5c27ce--
    129 </protocol>
    130 </verify>
    131 </testcase>
    132