File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data / test667
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Jun 3 10:01:16 2020 UTC (5 years ago) by misho
Branches: curl, MAIN
CVS tags: v7_70_0p4, HEAD
curl

    1: <testcase>
    2: <info>
    3: <keywords>
    4: HTTP
    5: HTTP POST
    6: HTTP MIME POST
    7: </keywords>
    8: </info>
    9: 
   10: #
   11: # Server-side
   12: <reply>
   13: <data>
   14: HTTP/1.1 200 OK
   15: Date: Thu, 09 Nov 2010 14:49:00 GMT
   16: Server: test-server/fake swsclose
   17: Connection: close
   18: Content-Type: text/html
   19: 
   20: hello
   21: </data>
   22: <datacheck>
   23: HTTP/1.1 200 OK
   24: Date: Thu, 09 Nov 2010 14:49:00 GMT
   25: Server: test-server/fake swsclose
   26: Connection: close
   27: Content-Type: text/html
   28: 
   29: hello
   30: </datacheck>
   31: </reply>
   32: 
   33: # Client-side
   34: <client>
   35: <server>
   36: http
   37: </server>
   38: # tool is what to use instead of 'curl'
   39: <tool>
   40: lib667
   41: </tool>
   42: 
   43:  <name>
   44: HTTP chunked mimepost using single-byte read callback with encoder
   45:  </name>
   46:  <command>
   47: http://%HOSTIP:%HTTPPORT/667
   48: </command>
   49: </client>
   50: 
   51: #
   52: # Verify data after the test has been "shot"
   53: <verify>
   54: <strippart>
   55: s/^--------------------------[a-z0-9]*/------------------------------/
   56: s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
   57: </strippart>
   58: # Note that the stripping above removes 12 bytes from every occurrence of the
   59: # boundary string and since 5 of them are in the body contents, we see
   60: # (5*12) == 60 bytes less
   61: <protocol>
   62: POST /667 HTTP/1.1
   63: Host: %HOSTIP:%HTTPPORT
   64: Accept: */*
   65: Transfer-Encoding: chunked
   66: Content-Type: multipart/form-data; boundary=----------------------------
   67: Expect: 100-continue
   68: 
   69: 7f
   70: ------------------------------
   71: Content-Disposition: form-data; name="field"
   72: Content-Transfer-Encoding: base64
   73: 
   74: 
   75: 4
   76: ZHVt
   77: 34
   78: bXk=
   79: --------------------------------
   80: 
   81: 0
   82: 
   83: </protocol>
   84: </verify>
   85: </testcase>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>