test683 835 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. netrc
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 200 OK
  13. Date: Fri, 05 Aug 2022 10:09:00 GMT
  14. Server: test-server/fake
  15. Content-Type: text/plain
  16. Content-Length: 6
  17. Connection: close
  18. -foo-
  19. </data>
  20. </reply>
  21. #
  22. # Client-side
  23. <client>
  24. <server>
  25. http
  26. </server>
  27. <name>
  28. netrc with multiple logins - pick second
  29. </name>
  30. <command>
  31. --netrc-optional --netrc-file log/netrc%TESTNUMBER http://user2@%HOSTIP:%HTTPPORT/
  32. </command>
  33. <file name="log/netrc%TESTNUMBER" >
  34. machine %HOSTIP login user1 password passwd1
  35. machine %HOSTIP login user2 password passwd2
  36. </file>
  37. </client>
  38. #
  39. # Verify data after the test has been "shot"
  40. <verify>
  41. <protocol>
  42. GET / HTTP/1.1
  43. Host: %HOSTIP:%HTTPPORT
  44. Authorization: Basic %b64[user2:passwd2]b64%
  45. User-Agent: curl/%VERSION
  46. Accept: */*
  47. </protocol>
  48. </verify>
  49. </testcase>