test479 (1911B)
1 <testcase> 2 <info> 3 <keywords> 4 netrc 5 HTTP 6 </keywords> 7 </info> 8 # 9 # Server-side 10 <reply> 11 <data crlf="yes"> 12 HTTP/1.1 301 Follow this you fool 13 Date: Tue, 09 Nov 2010 14:49:00 GMT 14 Server: test-server/fake 15 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 16 ETag: "21025-dc7-39462498" 17 Accept-Ranges: bytes 18 Content-Length: 6 19 Connection: close 20 Location: http://b.com/%TESTNUMBER0002 21 22 -foo- 23 </data> 24 25 <data2 crlf="yes"> 26 HTTP/1.1 200 OK 27 Date: Tue, 09 Nov 2010 14:49:00 GMT 28 Server: test-server/fake 29 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 30 ETag: "21025-dc7-39462498" 31 Accept-Ranges: bytes 32 Content-Length: 7 33 Connection: close 34 35 target 36 </data2> 37 38 <datacheck crlf="yes"> 39 HTTP/1.1 301 Follow this you fool 40 Date: Tue, 09 Nov 2010 14:49:00 GMT 41 Server: test-server/fake 42 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 43 ETag: "21025-dc7-39462498" 44 Accept-Ranges: bytes 45 Content-Length: 6 46 Connection: close 47 Location: http://b.com/%TESTNUMBER0002 48 49 HTTP/1.1 200 OK 50 Date: Tue, 09 Nov 2010 14:49:00 GMT 51 Server: test-server/fake 52 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 53 ETag: "21025-dc7-39462498" 54 Accept-Ranges: bytes 55 Content-Length: 7 56 Connection: close 57 58 target 59 </datacheck> 60 </reply> 61 62 # 63 # Client-side 64 <client> 65 <server> 66 http 67 </server> 68 <features> 69 proxy 70 </features> 71 <name> 72 .netrc with redirect and default without password 73 </name> 74 <command> 75 --netrc --netrc-file %LOGDIR/netrc%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT/ http://a.com/ 76 </command> 77 <file name="%LOGDIR/netrc%TESTNUMBER" > 78 79 machine a.com 80 login alice 81 password alicespassword 82 83 default 84 login bob 85 86 </file> 87 </client> 88 89 <verify> 90 <protocol> 91 GET http://a.com/ HTTP/1.1 92 Host: a.com 93 Authorization: Basic %b64[alice:alicespassword]b64% 94 User-Agent: curl/%VERSION 95 Accept: */* 96 Proxy-Connection: Keep-Alive 97 98 GET http://b.com/%TESTNUMBER0002 HTTP/1.1 99 Host: b.com 100 Authorization: Basic %b64[bob:]b64% 101 User-Agent: curl/%VERSION 102 Accept: */* 103 Proxy-Connection: Keep-Alive 104 105 </protocol> 106 </verify> 107 </testcase>