test486 (1874B)
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" with no password or login 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 85 </file> 86 </client> 87 88 <verify> 89 <protocol> 90 GET http://a.com/ HTTP/1.1 91 Host: a.com 92 Authorization: Basic %b64[alice:alicespassword]b64% 93 User-Agent: curl/%VERSION 94 Accept: */* 95 Proxy-Connection: Keep-Alive 96 97 GET http://b.com/%TESTNUMBER0002 HTTP/1.1 98 Host: b.com 99 User-Agent: curl/%VERSION 100 Accept: */* 101 Proxy-Connection: Keep-Alive 102 103 </protocol> 104 </verify> 105 </testcase>