File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data / test1073
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: # Redirection is used to force curl to realize that the server is
    3: # speaking HTTP 1.0. The request is impossible to satisfy with HTTP 1.0
    4: # because chunked encoding is unavailable, so the request must fail.
    5: <info>
    6: <keywords>
    7: HTTP
    8: HTTP PUT
    9: HTTP/1.0
   10: followlocation
   11: chunked Transfer-Encoding
   12: </keywords>
   13: </info>
   14: 
   15: # Server-side
   16: <reply>
   17: <data>
   18: HTTP/1.0 301 Redirect swsclose
   19: Server: testcurl
   20: Content-Type: text/plain
   21: Location: /newlocation/10730002
   22: Content-Length: 0
   23: Connection: close
   24: 
   25: </data>
   26: </reply>
   27: 
   28: # Client-side
   29: <client>
   30: <server>
   31: http
   32: </server>
   33:  <name>
   34: HTTP chunked PUT to HTTP 1.0 server with redirect
   35:  </name>
   36:  <command>
   37: http://%HOSTIP:%HTTPPORT/1073 -T - -L
   38: </command>
   39: <stdin>
   40: This is data we upload with PUT
   41: it comes from stdin so MUST be sent
   42: with chunked encoding
   43: which is impossible in HTTP/1.0
   44: </stdin>
   45: </client>
   46: 
   47: # Verify data after the test has been "shot"
   48: <verify>
   49: <errorcode>
   50: 25
   51: </errorcode>
   52: <strip>
   53: ^User-Agent:.*
   54: </strip>
   55: <protocol>
   56: PUT /1073 HTTP/1.1
   57: Host: %HOSTIP:%HTTPPORT
   58: Accept: */*
   59: Transfer-Encoding: chunked
   60: Expect: 100-continue
   61: 
   62: 7a
   63: This is data we upload with PUT
   64: it comes from stdin so MUST be sent
   65: with chunked encoding
   66: which is impossible in HTTP/1.0
   67: 
   68: 0
   69: 
   70: </protocol>
   71: </verify>
   72: </testcase>

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