test685 790 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 no login - provided user
  29. </name>
  30. <command>
  31. --netrc-optional --netrc-file %LOGDIR/netrc%TESTNUMBER http://user@%HOSTIP:%HTTPPORT/
  32. </command>
  33. <file name="%LOGDIR/netrc%TESTNUMBER" >
  34. machine %HOSTIP password 5up3r53cr37
  35. </file>
  36. </client>
  37. #
  38. # Verify data after the test has been "shot"
  39. <verify>
  40. <protocol>
  41. </protocol>
  42. GET / HTTP/1.1
  43. Host: %HOSTIP:%HTTPPORT
  44. Authorization: Basic %b64[user:5up3r53cr37]b64%
  45. User-Agent: curl/%VERSION
  46. Accept: */*
  47. </verify>
  48. </testcase>