File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data / test357
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, 6 months ago) by misho
Branches: curl, MAIN
CVS tags: v7_70_0p4, HEAD
curl

    1: <testcase>
    2: <info>
    3: <keywords>
    4: HTTP
    5: HTTP PUT
    6: Expect
    7: </keywords>
    8: </info>
    9: # Server-side
   10: <reply>
   11: # 417 means the server didn't like the Expect header
   12: <data>
   13: HTTP/1.1 417 OK swsbounce
   14: Date: Thu, 09 Nov 2010 14:49:00 GMT
   15: Server: test-server/fake
   16: Content-Length: 0
   17: 
   18: </data>
   19: <data1>
   20: HTTP/1.1 200 OK
   21: Date: Thu, 09 Nov 2010 14:49:00 GMT
   22: Server: test-server/fake
   23: Content-Length: 10
   24: 
   25: blablabla
   26: </data1>
   27: <datacheck>
   28: HTTP/1.1 417 OK swsbounce
   29: Date: Thu, 09 Nov 2010 14:49:00 GMT
   30: Server: test-server/fake
   31: Content-Length: 0
   32: 
   33: HTTP/1.1 200 OK
   34: Date: Thu, 09 Nov 2010 14:49:00 GMT
   35: Server: test-server/fake
   36: Content-Length: 10
   37: 
   38: blablabla
   39: </datacheck>
   40: <servercmd>
   41: no-expect
   42: </servercmd>
   43: </reply>
   44: 
   45: # Client-side
   46: <client>
   47: <server>
   48: http
   49: </server>
   50:  <name>
   51: HTTP PUT with Expect: 100-continue and 417 response
   52:  </name>
   53:  <command>
   54: http://%HOSTIP:%HTTPPORT/we/want/357 -T log/test357.txt
   55: </command>
   56: <file name="log/test357.txt">
   57: Weird
   58:      file
   59:          to
   60:    upload
   61: for
   62:    testing
   63: the
   64:    PUT
   65:       feature
   66: </file>
   67: </client>
   68: 
   69: # Verify data after the test has been "shot"
   70: <verify>
   71: <strip>
   72: ^User-Agent:.*
   73: </strip>
   74: <protocol>
   75: PUT /we/want/357 HTTP/1.1
   76: Host: %HOSTIP:%HTTPPORT
   77: Accept: */*
   78: Content-Length: 78
   79: Expect: 100-continue
   80: 
   81: PUT /we/want/357 HTTP/1.1
   82: Host: %HOSTIP:%HTTPPORT
   83: Accept: */*
   84: Content-Length: 78
   85: 
   86: Weird
   87:      file
   88:          to
   89:    upload
   90: for
   91:    testing
   92: the
   93:    PUT
   94:       feature
   95: </protocol>
   96: </verify>
   97: </testcase>

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