2
0

test540 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. HTTP proxy Digest auth
  8. multi
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. # this is returned first since we get no proxy-auth
  14. <data>
  15. HTTP/1.1 407 Authorization Required to proxy me my dear
  16. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  17. Content-Length: 33
  18. And you should ignore this data.
  19. </data>
  20. # then this is returned when we get proxy-auth
  21. <data1000>
  22. HTTP/1.1 200 OK
  23. Content-Length: 21
  24. Server: no
  25. Nice proxy auth sir!
  26. </data1000>
  27. <datacheck>
  28. HTTP/1.1 407 Authorization Required to proxy me my dear
  29. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  30. Content-Length: 33
  31. HTTP/1.1 200 OK
  32. Content-Length: 21
  33. Server: no
  34. Nice proxy auth sir!
  35. HTTP/1.1 200 OK
  36. Content-Length: 21
  37. Server: no
  38. Nice proxy auth sir!
  39. </datacheck>
  40. </reply>
  41. # Client-side
  42. <client>
  43. <server>
  44. http
  45. </server>
  46. # tool is what to use instead of 'curl'
  47. <tool>
  48. lib540
  49. </tool>
  50. <features>
  51. crypto
  52. </features>
  53. <name>
  54. HTTP proxy auth Digest multi API re-using connection
  55. </name>
  56. <command>
  57. http://test.remote.example.com/path/540 http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
  58. </command>
  59. </client>
  60. # Verify data after the test has been "shot"
  61. <verify>
  62. <strip>
  63. ^User-Agent: curl/.*
  64. </strip>
  65. <protocol>
  66. GET http://test.remote.example.com/path/540 HTTP/1.1
  67. Accept: */*
  68. Proxy-Connection: Keep-Alive
  69. Host: custom.set.host.name
  70. GET http://test.remote.example.com/path/540 HTTP/1.1
  71. Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"
  72. Accept: */*
  73. Proxy-Connection: Keep-Alive
  74. Host: custom.set.host.name
  75. GET http://test.remote.example.com/path/540 HTTP/1.1
  76. Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"
  77. Accept: */*
  78. Proxy-Connection: Keep-Alive
  79. Host: custom.set.host.name
  80. </protocol>
  81. </verify>
  82. </testcase>