File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data / test1105
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: cookies
    7: cookiejar
    8: </keywords>
    9: </info>
   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
   17: Content-Type: text/html
   18: Funny-head: yesyes swsclose
   19: Set-Cookie: foobar=name;
   20: Set-Cookie: mismatch=this; domain=127.0.0.1; path="/silly/";
   21: Set-Cookie: partmatch=present; domain=.0.0.1; path=/;
   22: 
   23: </data>
   24: </reply>
   25: 
   26: # Client-side
   27: <client>
   28: <server>
   29: http
   30: </server>
   31:  <name>
   32: HTTP with cookie parser and header recording
   33:  </name>
   34:  <command>
   35: "http://%HOSTIP:%HTTPPORT/we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105" -c log/cookie1105.txt -d "userid=myname&password=mypassword"
   36: </command>
   37: <precheck>
   38: perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
   39: </precheck>
   40: </client>
   41: 
   42: # Verify data after the test has been "shot"
   43: <verify>
   44: <strip>
   45: ^User-Agent:.*
   46: </strip>
   47: <protocol nonewline="yes">
   48: POST /we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105 HTTP/1.1
   49: Host: %HOSTIP:%HTTPPORT
   50: Accept: */*
   51: Content-Length: 33
   52: Content-Type: application/x-www-form-urlencoded
   53: 
   54: userid=myname&password=mypassword
   55: </protocol>
   56: <file name="log/cookie1105.txt" mode="text">
   57: # Netscape HTTP Cookie File
   58: # https://curl.haxx.se/docs/http-cookies.html
   59: # This file was generated by libcurl! Edit at your own risk.
   60: 
   61: 127.0.0.1	FALSE	"/silly/"	FALSE	0	mismatch	this
   62: 127.0.0.1	FALSE	/we/want/	FALSE	0	foobar	name
   63: </file>
   64: </verify>
   65: </testcase>

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